Skip to content

Commit

Permalink
Make building with docker more effecient
Browse files Browse the repository at this point in the history
- cleaning up apt cache will reduce image size
- doing COPY after apt will allow to reuse previous layer on recompile
  • Loading branch information
Hades32 authored and medvednikov committed Jul 25, 2019
1 parent ebf858b commit 8b195ba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ FROM buildpack-deps:buster-curl

LABEL maintainer="ANAGO Ronnel <anagoandy@gmail.com>"
WORKDIR /etc/vlang
COPY . .
RUN apt-get -yq update && \
apt-get install -y gcc clang make && \
make && \
apt-get install -y --no-install-recommends gcc clang make && \
rm -rf /var/lib/apt/lists/*
COPY . .
RUN make && \
ln -s /etc/vlang/v /usr/local/bin/v

CMD [ "bash" ]

0 comments on commit 8b195ba

Please sign in to comment.