2020-12-23 21:11:25 +03:00
|
|
|
FROM alpine:3.12
|
2019-11-28 11:46:52 +03:00
|
|
|
|
|
|
|
LABEL maintainer="spytheman <spytheman@bulsynt.org>"
|
|
|
|
|
|
|
|
WORKDIR /opt/vlang
|
|
|
|
|
|
|
|
ENV VVV /opt/vlang
|
|
|
|
ENV PATH /opt/vlang:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
2021-01-06 22:14:32 +03:00
|
|
|
ENV VFLAGS -cc gcc
|
2019-11-28 11:46:52 +03:00
|
|
|
|
|
|
|
RUN mkdir -p /opt/vlang && ln -s /opt/vlang/v /usr/bin/v
|
|
|
|
|
2021-07-24 16:01:32 +03:00
|
|
|
ARG USE_LOCAL
|
|
|
|
|
2022-08-08 22:32:14 +03:00
|
|
|
## libexecinfo is needed for the bundled tcc
|
2019-11-28 11:46:52 +03:00
|
|
|
RUN apk --no-cache add \
|
2021-01-06 22:14:32 +03:00
|
|
|
git make upx gcc bash \
|
2022-08-08 22:32:14 +03:00
|
|
|
musl-dev libc-dev \
|
2019-11-28 11:46:52 +03:00
|
|
|
openssl-dev sqlite-dev \
|
2022-08-08 22:32:14 +03:00
|
|
|
libx11-dev glfw-dev freetype-dev \
|
|
|
|
libexecinfo-dev libexecinfo-static \
|
|
|
|
libc6-compat gcompat binutils
|
2019-11-28 11:46:52 +03:00
|
|
|
|
2020-07-28 19:17:44 +03:00
|
|
|
## RUN apk --no-cache add --virtual sdl2deps sdl2-dev sdl2_ttf-dev sdl2_mixer-dev sdl2_image-dev
|
2021-07-24 16:01:32 +03:00
|
|
|
COPY . /vlang-local
|
|
|
|
|
|
|
|
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
|
2019-12-08 23:30:38 +03:00
|
|
|
|
2021-07-24 16:01:32 +03:00
|
|
|
RUN make && v -version
|
2021-02-27 11:08:33 +03:00
|
|
|
|
|
|
|
CMD ["v"]
|