Skip to content

Commit

Permalink
feat(dockerfile.*): ensure packages are cleaned up after installation
Browse files Browse the repository at this point in the history
Do for all except Gentoo, for performance reasons when actually using
the test containers.
  • Loading branch information
myii committed Dec 9, 2022
1 parent 174b856 commit 0acbb40
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile.apt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ SHELL ["/bin/bash", "-x", "-o", "pipefail", "-c"]
# hadolint ignore=SC1075,DL3008,DL4001
RUN apt-get update \
&& apt-get install --yes --no-install-recommends $PKGS \
&& apt-get clean \
# Install Salt using the bootstrap script (removing the 10 seconds delay to cancel the bootstrap)
&& curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
sed -e '/^\s\+echowarn "You have 10 seconds to cancel and stop the bootstrap process..."/,+2d' | \
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.dnf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ ARG SALT_REPO_URL=""

SHELL ["/bin/bash", "-x", "-o", "pipefail", "-c"]
# hadolint ignore=DL3041
RUN dnf -y update && dnf -y install ${PKGS} --setopt=install_weak_deps=False && dnf clean all \
RUN dnf -y update \
&& dnf -y install ${PKGS} --setopt=install_weak_deps=False \
&& dnf clean all \
# Install Salt using the bootstrap script (removing the 10 seconds delay to cancel the bootstrap)
&& curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
sed -e '/^\s\+echowarn "You have 10 seconds to cancel and stop the bootstrap process..."/,+2d' | \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.pac
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SHELL ["/bin/bash", "-x", "-o", "pipefail", "-c"]
RUN pacman --noconfirm -Sy archlinux-keyring \
&& pacman-db-upgrade \
&& pacman --noconfirm -Syu ${PKGS} \
&& pacman -Scc \
# Install Salt using the bootstrap script (removing the 10 seconds delay to cancel the bootstrap)
&& curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
sed -e '/^\s\+echowarn "You have 10 seconds to cancel and stop the bootstrap process..."/,+2d' | \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.yum
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ RUN if [[ "${DISTRO_NAME}" = "centos" ]]; then \
yum -y install epel-release; \
fi \
&& yum -y install ${PKGS} \
&& yum clean all \
# Install Salt using the bootstrap script (removing the 10 seconds delay to cancel the bootstrap)
&& curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
sed -e '/^\s\+echowarn "You have 10 seconds to cancel and stop the bootstrap process..."/,+2d' | \
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.zyp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ ARG SALT_REPO_URL=""

SHELL ["/bin/bash", "-x", "-o", "pipefail", "-c"]
# hadolint ignore=DL3037
RUN zypper refresh && zypper install --no-recommends -y ${PKGS} && zypper clean \
RUN zypper refresh \
&& zypper install --no-recommends -y ${PKGS} \
&& zypper clean \
&& systemctl enable sshd \
# https://github.com/inspec/train/issues/377
# https://github.com/inspec/train/pull/505
Expand Down

0 comments on commit 0acbb40

Please sign in to comment.