Skip to content

Commit

Permalink
Merge pull request #16 from AkihiroSuda/clean-up-logs
Browse files Browse the repository at this point in the history
Dockerfile: add `rm -rf /var/log/* /var/cache/ldconfig/aux-cache`
  • Loading branch information
AkihiroSuda authored Apr 24, 2024
2 parents a0a47b4 + f6e62e6 commit dd854ba
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 6 deletions.
6 changes: 6 additions & 0 deletions Dockerfile.archlinux
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ RUN \
repro-sources-list.sh && \
pacman -Sy && \
pacman -Su --noconfirm gcc

# Note: the following files in the image are not reproducible:
# etc/pacman.d/gnupg/trustdb.gpg
# var/cache/ldconfig/aux-cache
# var/lib/pacman/local/*/desc
# var/log/pacman.log
4 changes: 3 additions & 1 deletion Dockerfile.debian-11
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ RUN \
--mount=type=bind,source=./repro-sources-list.sh,target=/usr/local/bin/repro-sources-list.sh \
repro-sources-list.sh && \
apt-get update && \
apt-get install -y gcc
apt-get install -y gcc && \
: "Clean up for improving reproducibility (optional)" && \
rm -rf /var/log/* /var/cache/ldconfig/aux-cache
4 changes: 3 additions & 1 deletion Dockerfile.debian-12
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ RUN \
--mount=type=bind,source=./repro-sources-list.sh,target=/usr/local/bin/repro-sources-list.sh \
repro-sources-list.sh && \
apt-get update && \
apt-get install -y gcc
apt-get install -y gcc && \
: "Clean up for improving reproducibility (optional)" && \
rm -rf /var/log/* /var/cache/ldconfig/aux-cache
4 changes: 3 additions & 1 deletion Dockerfile.ubuntu-2204
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ RUN \
--mount=type=bind,source=./repro-sources-list.sh,target=/usr/local/bin/repro-sources-list.sh \
repro-sources-list.sh && \
apt-get update && \
apt-get install -y gcc
apt-get install -y gcc && \
: "Clean up for improving reproducibility (optional)" && \
rm -rf /var/log/* /var/cache/ldconfig/aux-cache
4 changes: 3 additions & 1 deletion Dockerfile.ubuntu-2404
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ RUN \
--mount=type=bind,source=./repro-sources-list.sh,target=/usr/local/bin/repro-sources-list.sh \
repro-sources-list.sh && \
apt-get update && \
apt-get install -y gcc
apt-get install -y gcc && \
: "Clean up for improving reproducibility (optional)" && \
rm -rf /var/log/* /var/cache/ldconfig/aux-cache
4 changes: 3 additions & 1 deletion alternative/Dockerfile.debian-13
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ RUN \
: "Fetching the snapshot and installing ca-certificates in one command" && \
apt-get install --update --snapshot "${snapshot}" -o Acquire::Check-Valid-Until=false -o Acquire::https::Verify-Peer=false -y ca-certificates && \
: "Installing gcc" && \
apt-get install --snapshot "${snapshot}" -y gcc
apt-get install --snapshot "${snapshot}" -y gcc && \
: "Clean up for improving reproducibility (optional)" && \
rm -rf /var/log/* /var/cache/ldconfig/aux-cache
4 changes: 3 additions & 1 deletion alternative/Dockerfile.ubuntu-2404
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ RUN \
: "Fetching the snapshot and installing ca-certificates in one command" && \
apt-get install --update --snapshot "${snapshot}" -o Acquire::Check-Valid-Until=false -o Acquire::https::Verify-Peer=false -y ca-certificates && \
: "Installing gcc" && \
apt-get install --snapshot "${snapshot}" -y gcc
apt-get install --snapshot "${snapshot}" -y gcc && \
: "Clean up for improving reproducibility (optional)" && \
rm -rf /var/log/* /var/cache/ldconfig/aux-cache

0 comments on commit dd854ba

Please sign in to comment.