v
Raw file
		
1#same container that golang use
2FROM buildpack-deps:buster-curl
3
4LABEL maintainer="ANAGO Ronnel <[email protected]>"
5WORKDIR /opt/vlang
6
7ARG USE_LOCAL
8
9RUN apt-get update && \
10 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gcc clang make git binutils && \
11 apt-get clean && rm -rf /var/cache/apt/archives/* && \
12 rm -rf /var/lib/apt/lists/*
13
14COPY . /vlang-local
15
16RUN if [ -z "${USE_LOCAL}" ] ; then \
17 git clone https://github.com/vlang/v/ /opt/vlang && \
18 rm -rf /vlang-local ; \
19 else \
20 mv /vlang-local/* . && \
21 rm -rf /vlang-local ; \
22 fi
23
24RUN make && \
25 ln -s /opt/vlang/v /usr/local/bin/v
26
27CMD [ "v" ]