2022-01-27 19:18:11 +01:00
|
|
|
FROM alpine:3.15
|
2022-01-14 11:20:24 +01:00
|
|
|
|
2022-01-22 23:03:15 +01:00
|
|
|
ARG TARGETPLATFORM
|
2022-01-14 11:20:24 +01:00
|
|
|
|
|
|
|
WORKDIR /opt/vlang
|
|
|
|
|
|
|
|
ENV VVV /opt/vlang
|
|
|
|
ENV PATH /opt/vlang:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
ENV VFLAGS -cc gcc
|
2022-01-27 19:24:35 +01:00
|
|
|
ENV V_PATH /opt/vlang/v
|
2022-01-14 11:20:24 +01:00
|
|
|
|
2022-01-20 21:52:19 +01:00
|
|
|
RUN ln -s /opt/vlang/v /usr/bin/v && \
|
2022-01-14 19:59:30 +01:00
|
|
|
apk --no-cache add \
|
2022-01-22 22:37:27 +01:00
|
|
|
git make gcc curl openssl \
|
2022-01-14 19:59:30 +01:00
|
|
|
musl-dev \
|
|
|
|
openssl-libs-static openssl-dev \
|
|
|
|
zlib-static bzip2-static xz-dev expat-static zstd-static lz4-static \
|
|
|
|
sqlite-static sqlite-dev \
|
|
|
|
libx11-dev glfw-dev freetype-dev \
|
|
|
|
libarchive-static libarchive-dev \
|
|
|
|
diffutils
|
2022-01-14 11:20:24 +01:00
|
|
|
|
2022-01-27 19:18:11 +01:00
|
|
|
COPY patches ./patches
|
|
|
|
COPY Makefile ./
|
|
|
|
|
|
|
|
RUN make v && \
|
|
|
|
mv v-*/* /opt/vlang && \
|
|
|
|
v -version
|
|
|
|
|
2022-01-22 22:58:09 +01:00
|
|
|
RUN if [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \
|
|
|
|
wget -O /usr/local/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc && \
|
|
|
|
chmod +x /usr/local/bin/mc ; \
|
|
|
|
fi
|
2022-01-14 11:20:24 +01:00
|
|
|
|
|
|
|
CMD ["v"]
|