1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Dockerfile.alpine: copy source, instead of cloning the repo (#10916)

This commit is contained in:
353fc443 2021-07-24 18:31:32 +05:30 committed by GitHub
parent f51fa7e665
commit 42bf385ff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,8 @@ ENV VFLAGS -cc gcc
RUN mkdir -p /opt/vlang && ln -s /opt/vlang/v /usr/bin/v
ARG USE_LOCAL
RUN apk --no-cache add \
git make upx gcc bash \
musl-dev \
@ -17,7 +19,16 @@ RUN apk --no-cache add \
libx11-dev glfw-dev freetype-dev
## RUN apk --no-cache add --virtual sdl2deps sdl2-dev sdl2_ttf-dev sdl2_mixer-dev sdl2_image-dev
COPY . /vlang-local
RUN git clone https://github.com/vlang/v /opt/vlang && make && v -version
RUN if [[ -z "${USE_LOCAL}" ]] ; then \
git clone https://github.com/vlang/v/ /opt/vlang && \
rm -rf /vlang-local ; \
else \
mv /vlang-local/* . && \
rm -rf /vlang-local ; \
fi
RUN make && v -version
CMD ["v"]