v
Raw file
		
1FROM alpine:3.12
2
3LABEL maintainer="spytheman <[email protected]>"
4
5WORKDIR /opt/vlang
6
7ENV VVV /opt/vlang
8ENV PATH /opt/vlang:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9ENV VFLAGS -cc gcc
10
11RUN mkdir -p /opt/vlang && ln -s /opt/vlang/v /usr/bin/v
12
13ARG USE_LOCAL
14
15## libexecinfo is needed for the bundled tcc
16RUN apk --no-cache add \
17 git make upx gcc bash \
18 musl-dev libc-dev \
19 openssl-dev sqlite-dev \
20 libx11-dev glfw-dev freetype-dev \
21 libexecinfo-dev libexecinfo-static \
22 libc6-compat gcompat binutils
23
24## RUN apk --no-cache add --virtual sdl2deps sdl2-dev sdl2_ttf-dev sdl2_mixer-dev sdl2_image-dev
25COPY . /vlang-local
26
27RUN if [[ -z "${USE_LOCAL}" ]] ; then \
28 git clone https://github.com/vlang/v/ /opt/vlang && \
29 rm -rf /vlang-local ; \
30 else \
31 mv /vlang-local/* . && \
32 rm -rf /vlang-local ; \
33 fi
34
35RUN make && v -version
36
37CMD ["v"]