Skip to content

Commit

Permalink
chore(Dockerfile): cleanup after installation a bit more than before …
Browse files Browse the repository at this point in the history
…and keep copyright / license files (#113)
  • Loading branch information
helgi authored Sep 27, 2016
1 parent beb1d32 commit 2a7769d
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions rootfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,25 @@ RUN addgroup --quiet --gid 2000 slug && \
RUN sed -i -e 's/^deb-src/#deb-src/' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y md5deep && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc && \
# cleanup
apt-get autoremove -y && \
apt-get clean -y && \
# package up license files if any by appending to existing tar
COPYRIGHT_TAR='/usr/share/copyrights.tar'; \
gunzip $COPYRIGHT_TAR.gz; tar -rf $COPYRIGHT_TAR /usr/share/doc/*/copyright; gzip $COPYRIGHT_TAR && \
rm -rf \
/usr/share/doc \
/usr/share/man \
/usr/share/info \
/usr/share/locale \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
/etc/systemd \
/lib/lsb \
/lib/udev \
/usr/lib/x86_64-linux-gnu/gconv/IBM* \
/usr/lib/x86_64-linux-gnu/gconv/EBC* && \
bash -c "mkdir -p /usr/share/man/man{1..8}"

ADD . /
Expand Down

0 comments on commit 2a7769d

Please sign in to comment.