about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKyle Ossinger <k0ss@users.noreply.github.com>2019-11-13 03:42:39 +0000
committerGitHub <noreply@github.com>2019-11-13 03:42:39 +0000
commit22cfd595efcf8d237beb1d7c707dda8d366b5bed (patch)
tree6cb9e322458ce6416b4a8a2101c0cd450582027e
parente235c02e1e0b949911212ee024fc882427cc5ba8 (diff)
downloadafl++-22cfd595efcf8d237beb1d7c707dda8d366b5bed.tar.gz
Shaved 600mB off resulting Docker image
By removing the build files after the build is complete, we save 600mB of unnecessary bulk.  The total image size will now be 1gB.
-rw-r--r--Dockerfile9
1 files changed, 4 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index c62cbdab..eac468c8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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