Skip to content

Commit

Permalink
Shaved 600mB off resulting Docker image
Browse files Browse the repository at this point in the history
By removing the build files after the build is complete, we save 600mB of unnecessary bulk.  The total image size will now be 1gB.
  • Loading branch information
k0ss authored Nov 13, 2019
1 parent e235c02 commit 22cfd59
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ RUN apt-get update && apt-get install -y \
wget \
ca-certificates \
libpixman-1-dev \
&& rm -fr /var/lib/apt/lists/*
RUN mkdir /app
WORKDIR /app
COPY . .
&& rm -rf /var/lib/apt/lists/*
ARG CC=gcc-9
ARG CXX=g++-9
ARG LLVM_CONFIG=llvm-config-9
RUN make clean && make distrib && make install
COPY . /app
RUN cd /app && make clean && make distrib && \
make install && cd .. && rm -rf /app

0 comments on commit 22cfd59

Please sign in to comment.