From f910e848665d4dae0687f5448189b7430830e27d Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 15:15:02 +0200 Subject: [PATCH 01/17] add linting using Hadolint Signed-off-by: Martin Schurz --- .github/workflows/lint.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..bf96550 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,17 @@ +name: lint + +on: + # yamllint disable-line rule:truthy + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: hadolint/hadolint-action@v3.1.0 + with: + recursive: true From d25a04f18b4a7927bd1a6c22292992d6ba483a07 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 17:01:52 +0200 Subject: [PATCH 02/17] lint: we are ok with latest tags Signed-off-by: Martin Schurz --- .hadolint.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .hadolint.yaml diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 0000000..6b1c6eb --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,3 @@ +ignored: + - DL3007 # we don't want to pin versions + - DL3018 # we don't want to pin versions From cdf63e10f8dd64d28bd55f8dde8dbdb3dd00b2c7 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 17:04:18 +0200 Subject: [PATCH 03/17] lint: we are ok with latest tags Signed-off-by: Martin Schurz --- .hadolint.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hadolint.yaml b/.hadolint.yaml index 6b1c6eb..21535bc 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -1,3 +1,5 @@ ignored: - DL3007 # we don't want to pin versions + - DL3008 # we don't want to pin versions + - DL3013 # we don't want to pin versions - DL3018 # we don't want to pin versions From a211087d16ad1cd3d4f287b1624e1d828b8dad1b Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 17:05:33 +0200 Subject: [PATCH 04/17] lint: we are ok with latest tags Signed-off-by: Martin Schurz --- .hadolint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.hadolint.yaml b/.hadolint.yaml index 21535bc..f903d6a 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -3,3 +3,4 @@ ignored: - DL3008 # we don't want to pin versions - DL3013 # we don't want to pin versions - DL3018 # we don't want to pin versions + - DL3033 # we don't want to pin versions From 3887e6f53b551ae1f778659778918885d694cc22 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 17:10:02 +0200 Subject: [PATCH 05/17] lint: DL3042 no pip cache Signed-off-by: Martin Schurz --- centos7-ansible-latest/Dockerfile | 2 +- centos8-ansible-latest/Dockerfile | 2 +- centosstream8-ansible-latest/Dockerfile | 2 +- centosstream9-ansible-latest/Dockerfile | 2 +- debian10-ansible-latest/Dockerfile | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/centos7-ansible-latest/Dockerfile b/centos7-ansible-latest/Dockerfile index 03742d9..80a1696 100644 --- a/centos7-ansible-latest/Dockerfile +++ b/centos7-ansible-latest/Dockerfile @@ -37,7 +37,7 @@ RUN yum -y install yum-plugin-copr libseccomp && \ RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers # Upgrade pip so cryptography package works. -RUN python3 -m pip install --upgrade pip && \ +RUN python3 -m pip install --no-cache-dir --upgrade pip && \ pip3 install ansible # https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user diff --git a/centos8-ansible-latest/Dockerfile b/centos8-ansible-latest/Dockerfile index 8a746fa..b0b1cbc 100644 --- a/centos8-ansible-latest/Dockerfile +++ b/centos8-ansible-latest/Dockerfile @@ -27,7 +27,7 @@ RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" -e "s|#baseurl=http://mirror.centos && yum clean all # upgrade pip because of the rust dependency error -RUN python3 -m pip install --upgrade pip && \ +RUN python3 -m pip install --no-cache-dir --upgrade pip && \ pip3 install ansible # Disable requiretty. diff --git a/centosstream8-ansible-latest/Dockerfile b/centosstream8-ansible-latest/Dockerfile index 56d7bc0..340057e 100644 --- a/centosstream8-ansible-latest/Dockerfile +++ b/centosstream8-ansible-latest/Dockerfile @@ -27,7 +27,7 @@ RUN yum makecache --timer \ && yum clean all # upgrade pip because of the rust dependency error -RUN python3 -m pip install --upgrade pip && \ +RUN python3 -m pip install --no-cache-dir --upgrade pip && \ pip3 install ansible # Disable requiretty. diff --git a/centosstream9-ansible-latest/Dockerfile b/centosstream9-ansible-latest/Dockerfile index a0b63f4..cbaf10b 100644 --- a/centosstream9-ansible-latest/Dockerfile +++ b/centosstream9-ansible-latest/Dockerfile @@ -25,7 +25,7 @@ RUN yum makecache --timer \ && yum clean all # upgrade pip because of the rust dependency error -RUN python3 -m pip install --upgrade pip && \ +RUN python3 -m pip install --no-cache-dir --upgrade pip && \ pip3 install ansible # Disable requiretty. diff --git a/debian10-ansible-latest/Dockerfile b/debian10-ansible-latest/Dockerfile index a27fe2b..d8c21ad 100644 --- a/debian10-ansible-latest/Dockerfile +++ b/debian10-ansible-latest/Dockerfile @@ -6,8 +6,8 @@ RUN apt-get update -y && apt-get install --fix-missing && \ apt-get install -y \ python python-yaml sudo \ curl gcc python-pip python-dev libffi-dev libssl-dev systemd -RUN pip install --upgrade cffi && \ - pip install ansible +RUN pip install --no-cache-dir --upgrade cffi && \ + pip install --no-cache-dir ansible RUN apt-get -f -y --auto-remove remove \ gcc python-pip python-dev libffi-dev libssl-dev && \ From acf4d76bc7f79075ff8d4badefaac635fbb0b469 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 17:10:37 +0200 Subject: [PATCH 06/17] lint: we are ok with latest tags Signed-off-by: Martin Schurz --- .hadolint.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hadolint.yaml b/.hadolint.yaml index f903d6a..c40dc36 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -4,3 +4,5 @@ ignored: - DL3013 # we don't want to pin versions - DL3018 # we don't want to pin versions - DL3033 # we don't want to pin versions + - DL3041 # we don't want to pin versions + - DL3037 # we don't want to pin versions From 145f223a39f3324bcaa0dab2386c18788c55305a Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 17:23:40 +0200 Subject: [PATCH 07/17] lint: DL3042 no pip cache Signed-off-by: Martin Schurz --- amazon2023-ansible-latest/Dockerfile | 2 +- centos7-ansible-latest/Dockerfile | 2 +- centos8-ansible-latest/Dockerfile | 2 +- centosstream8-ansible-latest/Dockerfile | 2 +- centosstream9-ansible-latest/Dockerfile | 2 +- openwrt-ansible-latest/Dockerfile | 4 ++-- rocky8-ansible-latest/Dockerfile | 4 ++-- rocky9-ansible-latest/Dockerfile | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/amazon2023-ansible-latest/Dockerfile b/amazon2023-ansible-latest/Dockerfile index c828bbf..043ed19 100644 --- a/amazon2023-ansible-latest/Dockerfile +++ b/amazon2023-ansible-latest/Dockerfile @@ -13,7 +13,7 @@ RUN yum makecache --timer && \ python3-pip && \ yum clean all -RUN pip3 install ansible +RUN pip3 install --no-cache-dir ansible # Disable requiretty. RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers diff --git a/centos7-ansible-latest/Dockerfile b/centos7-ansible-latest/Dockerfile index 80a1696..b643cf9 100644 --- a/centos7-ansible-latest/Dockerfile +++ b/centos7-ansible-latest/Dockerfile @@ -38,7 +38,7 @@ RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers # Upgrade pip so cryptography package works. RUN python3 -m pip install --no-cache-dir --upgrade pip && \ - pip3 install ansible + pip3 install --no-cache-dir ansible # https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user # Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP` diff --git a/centos8-ansible-latest/Dockerfile b/centos8-ansible-latest/Dockerfile index b0b1cbc..7271b13 100644 --- a/centos8-ansible-latest/Dockerfile +++ b/centos8-ansible-latest/Dockerfile @@ -28,7 +28,7 @@ RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" -e "s|#baseurl=http://mirror.centos # upgrade pip because of the rust dependency error RUN python3 -m pip install --no-cache-dir --upgrade pip && \ - pip3 install ansible + pip3 install --no-cache-dir ansible # Disable requiretty. RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers diff --git a/centosstream8-ansible-latest/Dockerfile b/centosstream8-ansible-latest/Dockerfile index 340057e..a235016 100644 --- a/centosstream8-ansible-latest/Dockerfile +++ b/centosstream8-ansible-latest/Dockerfile @@ -28,7 +28,7 @@ RUN yum makecache --timer \ # upgrade pip because of the rust dependency error RUN python3 -m pip install --no-cache-dir --upgrade pip && \ - pip3 install ansible + pip3 install --no-cache-dir ansible # Disable requiretty. RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers diff --git a/centosstream9-ansible-latest/Dockerfile b/centosstream9-ansible-latest/Dockerfile index cbaf10b..33b1bb6 100644 --- a/centosstream9-ansible-latest/Dockerfile +++ b/centosstream9-ansible-latest/Dockerfile @@ -26,7 +26,7 @@ RUN yum makecache --timer \ # upgrade pip because of the rust dependency error RUN python3 -m pip install --no-cache-dir --upgrade pip && \ - pip3 install ansible + pip3 install --no-cache-dir ansible # Disable requiretty. RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers diff --git a/openwrt-ansible-latest/Dockerfile b/openwrt-ansible-latest/Dockerfile index 9298a30..84d19b8 100644 --- a/openwrt-ansible-latest/Dockerfile +++ b/openwrt-ansible-latest/Dockerfile @@ -7,8 +7,8 @@ RUN mkdir -p /var/lock && \ opkg install python3 python3-pip python3-cryptography \ sudo bash sed shadow-su shadow-groupadd shadow-useradd shadow-usermod -RUN pip3 install --upgrade pip && \ - pip3 install ansible +RUN pip3 install --no-cache-dir --upgrade pip && \ + pip3 install --no-cache-dir ansible # Install Ansible inventory file RUN mkdir -p /etc/ansible \ diff --git a/rocky8-ansible-latest/Dockerfile b/rocky8-ansible-latest/Dockerfile index d5eb5d1..43ee3c6 100644 --- a/rocky8-ansible-latest/Dockerfile +++ b/rocky8-ansible-latest/Dockerfile @@ -26,8 +26,8 @@ RUN yum makecache --timer \ && yum clean all # upgrade pip because of the rust dependency error -RUN pip3 install --upgrade pip && \ - pip3 install ansible +RUN pip3 install --no-cache-dir --upgrade pip && \ + pip3 install --no-cache-dir ansible # Disable requiretty. RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers diff --git a/rocky9-ansible-latest/Dockerfile b/rocky9-ansible-latest/Dockerfile index afb16c7..e71fb52 100644 --- a/rocky9-ansible-latest/Dockerfile +++ b/rocky9-ansible-latest/Dockerfile @@ -18,8 +18,8 @@ RUN yum makecache --timer \ && yum clean all # upgrade pip because of the rust dependency error -RUN pip3 install --upgrade pip && \ - pip3 install ansible +RUN pip3 install --no-cache-dir --upgrade pip && \ + pip3 install --no-cache-dir ansible # Disable requiretty. RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers From 01b7eb6852eb98c53b696a7d15d0d31cc46d6b39 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 17:48:18 +0200 Subject: [PATCH 08/17] lint: DL3003 don't cd into directories Signed-off-by: Martin Schurz --- arch-ansible-latest/Dockerfile | 14 +++++++------- centos7-ansible-latest/Dockerfile | 16 ++++++++-------- centos8-ansible-latest/Dockerfile | 16 ++++++++-------- centosstream8-ansible-latest/Dockerfile | 16 ++++++++-------- fedora37-ansible-latest/Dockerfile | 16 ++++++++-------- fedora38-ansible-latest/Dockerfile | 16 ++++++++-------- rocky8-ansible-latest/Dockerfile | 16 ++++++++-------- 7 files changed, 55 insertions(+), 55 deletions(-) diff --git a/arch-ansible-latest/Dockerfile b/arch-ansible-latest/Dockerfile index 462860e..582f7f6 100644 --- a/arch-ansible-latest/Dockerfile +++ b/arch-ansible-latest/Dockerfile @@ -7,13 +7,13 @@ RUN pacman -S -y \ sudo \ systemd \ && \ - (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -vf $i; done); \ - rm -vf /lib/systemd/system/multi-user.target.wants/*; \ - rm -vf /etc/systemd/system/*.wants/*; \ - rm -vf /lib/systemd/system/local-fs.target.wants/*; \ - rm -vf /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -vf /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -vf /lib/systemd/system/basic.target.wants/*; + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -vf $i; done \ + rm -vf /lib/systemd/system/multi-user.target.wants/*; \ + rm -vf /etc/systemd/system/*.wants/*; \ + rm -vf /lib/systemd/system/local-fs.target.wants/*; \ + rm -vf /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -vf /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -vf /lib/systemd/system/basic.target.wants/*; # Update archlinux-keyring. RUN pacman -S -y \ diff --git a/centos7-ansible-latest/Dockerfile b/centos7-ansible-latest/Dockerfile index b643cf9..18445d1 100644 --- a/centos7-ansible-latest/Dockerfile +++ b/centos7-ansible-latest/Dockerfile @@ -6,14 +6,14 @@ ENV LC_ALL en_US.UTF-8 # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ -(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ -rm -f /lib/systemd/system/multi-user.target.wants/*;\ -rm -f /etc/systemd/system/*.wants/*;\ -rm -f /lib/systemd/system/local-fs.target.wants/*; \ -rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ -rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ -rm -f /lib/systemd/system/basic.target.wants/*;\ -rm -f /lib/systemd/system/anaconda.target.wants/*; + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + rm -f /lib/systemd/system/multi-user.target.wants/*;\ + rm -f /etc/systemd/system/*.wants/*;\ + rm -f /lib/systemd/system/local-fs.target.wants/*; \ + rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -f /lib/systemd/system/basic.target.wants/*;\ + rm -f /lib/systemd/system/anaconda.target.wants/*; # Install requirements. RUN yum makecache fast && \ diff --git a/centos8-ansible-latest/Dockerfile b/centos8-ansible-latest/Dockerfile index 7271b13..faf91d2 100644 --- a/centos8-ansible-latest/Dockerfile +++ b/centos8-ansible-latest/Dockerfile @@ -4,14 +4,14 @@ ENV container=docker # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ -(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ -rm -f /lib/systemd/system/multi-user.target.wants/*;\ -rm -f /etc/systemd/system/*.wants/*;\ -rm -f /lib/systemd/system/local-fs.target.wants/*; \ -rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ -rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ -rm -f /lib/systemd/system/basic.target.wants/*;\ -rm -f /lib/systemd/system/anaconda.target.wants/*; + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + rm -f /lib/systemd/system/multi-user.target.wants/*;\ + rm -f /etc/systemd/system/*.wants/*;\ + rm -f /lib/systemd/system/local-fs.target.wants/*; \ + rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -f /lib/systemd/system/basic.target.wants/*;\ + rm -f /lib/systemd/system/anaconda.target.wants/*; # Install Ansible and other requirements. RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-Linux-* \ diff --git a/centosstream8-ansible-latest/Dockerfile b/centosstream8-ansible-latest/Dockerfile index a235016..b2b106c 100644 --- a/centosstream8-ansible-latest/Dockerfile +++ b/centosstream8-ansible-latest/Dockerfile @@ -4,14 +4,14 @@ ENV container=docker # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ -(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ -rm -f /lib/systemd/system/multi-user.target.wants/*;\ -rm -f /etc/systemd/system/*.wants/*;\ -rm -f /lib/systemd/system/local-fs.target.wants/*; \ -rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ -rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ -rm -f /lib/systemd/system/basic.target.wants/*;\ -rm -f /lib/systemd/system/anaconda.target.wants/*; + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + rm -f /lib/systemd/system/multi-user.target.wants/*;\ + rm -f /etc/systemd/system/*.wants/*;\ + rm -f /lib/systemd/system/local-fs.target.wants/*; \ + rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -f /lib/systemd/system/basic.target.wants/*;\ + rm -f /lib/systemd/system/anaconda.target.wants/*; # Install Ansible and other requirements. RUN yum makecache --timer \ diff --git a/fedora37-ansible-latest/Dockerfile b/fedora37-ansible-latest/Dockerfile index 066b06e..e54b4c6 100644 --- a/fedora37-ansible-latest/Dockerfile +++ b/fedora37-ansible-latest/Dockerfile @@ -3,14 +3,14 @@ LABEL maintainer="Sebastian Gumprich; Nejc Habjan; Diego Louzan; Max Wittig" # Enable systemd. RUN dnf -y install systemd && dnf clean all && \ - (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ - rm -f /lib/systemd/system/multi-user.target.wants/*;\ - rm -f /etc/systemd/system/*.wants/*;\ - rm -f /lib/systemd/system/local-fs.target.wants/*; \ - rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -f /lib/systemd/system/basic.target.wants/*;\ - rm -f /lib/systemd/system/anaconda.target.wants/*; + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + rm -f /lib/systemd/system/multi-user.target.wants/*;\ + rm -f /etc/systemd/system/*.wants/*;\ + rm -f /lib/systemd/system/local-fs.target.wants/*; \ + rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -f /lib/systemd/system/basic.target.wants/*;\ + rm -f /lib/systemd/system/anaconda.target.wants/*; RUN dnf -y update \ && dnf -y install ansible python python3-libselinux \ diff --git a/fedora38-ansible-latest/Dockerfile b/fedora38-ansible-latest/Dockerfile index f361587..b7b089d 100644 --- a/fedora38-ansible-latest/Dockerfile +++ b/fedora38-ansible-latest/Dockerfile @@ -3,14 +3,14 @@ LABEL maintainer="Sebastian Gumprich, Nejc Habjan, Diego Louzan, Max Wittig" # Enable systemd. RUN dnf -y install systemd && dnf clean all && \ - (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ - rm -f /lib/systemd/system/multi-user.target.wants/*;\ - rm -f /etc/systemd/system/*.wants/*;\ - rm -f /lib/systemd/system/local-fs.target.wants/*; \ - rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ - rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ - rm -f /lib/systemd/system/basic.target.wants/*;\ - rm -f /lib/systemd/system/anaconda.target.wants/*; + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + rm -f /lib/systemd/system/multi-user.target.wants/*;\ + rm -f /etc/systemd/system/*.wants/*;\ + rm -f /lib/systemd/system/local-fs.target.wants/*; \ + rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -f /lib/systemd/system/basic.target.wants/*;\ + rm -f /lib/systemd/system/anaconda.target.wants/*; RUN dnf -y update \ && dnf -y install ansible python python3-libselinux \ diff --git a/rocky8-ansible-latest/Dockerfile b/rocky8-ansible-latest/Dockerfile index 43ee3c6..30c668b 100644 --- a/rocky8-ansible-latest/Dockerfile +++ b/rocky8-ansible-latest/Dockerfile @@ -4,14 +4,14 @@ ENV container=docker # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ -(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ -rm -f /lib/systemd/system/multi-user.target.wants/*;\ -rm -f /etc/systemd/system/*.wants/*;\ -rm -f /lib/systemd/system/local-fs.target.wants/*; \ -rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ -rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ -rm -f /lib/systemd/system/basic.target.wants/*;\ -rm -f /lib/systemd/system/anaconda.target.wants/*; + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + rm -f /lib/systemd/system/multi-user.target.wants/*;\ + rm -f /etc/systemd/system/*.wants/*;\ + rm -f /lib/systemd/system/local-fs.target.wants/*; \ + rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -f /lib/systemd/system/basic.target.wants/*;\ + rm -f /lib/systemd/system/anaconda.target.wants/*; # Install Ansible and other requirements. RUN yum makecache --timer \ From 8daa6fe6684705653115ddb6e97565949a975588 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 18:00:55 +0200 Subject: [PATCH 09/17] lint: SC30XX we don'tcare about POSIX compatibility Signed-off-by: Martin Schurz --- .hadolint.yaml | 2 ++ opensuse_tumbleweed-ansible-latest/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.hadolint.yaml b/.hadolint.yaml index c40dc36..0869ef0 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -6,3 +6,5 @@ ignored: - DL3033 # we don't want to pin versions - DL3041 # we don't want to pin versions - DL3037 # we don't want to pin versions + - SC3009 # we don't care aboint POSIX compatibility + - SC3037 # we don't care aboint POSIX compatibility diff --git a/opensuse_tumbleweed-ansible-latest/Dockerfile b/opensuse_tumbleweed-ansible-latest/Dockerfile index ba41262..abb1cb5 100644 --- a/opensuse_tumbleweed-ansible-latest/Dockerfile +++ b/opensuse_tumbleweed-ansible-latest/Dockerfile @@ -2,7 +2,8 @@ FROM opensuse/tumbleweed:latest LABEL maintainer="Sebastian Gumprich" ENV container=docker -RUN zypper install -y python ansible dbus-1 systemd-sysvinit shadow sudo +RUN zypper install -y python ansible dbus-1 systemd-sysvinit shadow sudo && \ + zypper clean RUN cp /usr/lib/systemd/system/dbus.service /etc/systemd/system/; \ sed -i 's/OOMScoreAdjust=-900//' /etc/systemd/system/dbus.service From 7783ef39f83947f453d1d0171021a054dcfc898e Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 18:03:41 +0200 Subject: [PATCH 10/17] lint: SC1141 properly use for loop Signed-off-by: Martin Schurz --- arch-ansible-latest/Dockerfile | 2 +- centos7-ansible-latest/Dockerfile | 2 +- centos8-ansible-latest/Dockerfile | 2 +- centosstream8-ansible-latest/Dockerfile | 2 +- fedora37-ansible-latest/Dockerfile | 2 +- fedora38-ansible-latest/Dockerfile | 2 +- rocky8-ansible-latest/Dockerfile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch-ansible-latest/Dockerfile b/arch-ansible-latest/Dockerfile index 582f7f6..a6f2eb7 100644 --- a/arch-ansible-latest/Dockerfile +++ b/arch-ansible-latest/Dockerfile @@ -7,7 +7,7 @@ RUN pacman -S -y \ sudo \ systemd \ && \ - for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -vf $i; done \ + (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -vf $i; done) \ rm -vf /lib/systemd/system/multi-user.target.wants/*; \ rm -vf /etc/systemd/system/*.wants/*; \ rm -vf /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/centos7-ansible-latest/Dockerfile b/centos7-ansible-latest/Dockerfile index 18445d1..1cf43a6 100644 --- a/centos7-ansible-latest/Dockerfile +++ b/centos7-ansible-latest/Dockerfile @@ -6,7 +6,7 @@ ENV LC_ALL en_US.UTF-8 # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ - for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/centos8-ansible-latest/Dockerfile b/centos8-ansible-latest/Dockerfile index faf91d2..5aa53bc 100644 --- a/centos8-ansible-latest/Dockerfile +++ b/centos8-ansible-latest/Dockerfile @@ -4,7 +4,7 @@ ENV container=docker # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ - for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/centosstream8-ansible-latest/Dockerfile b/centosstream8-ansible-latest/Dockerfile index b2b106c..0c03843 100644 --- a/centosstream8-ansible-latest/Dockerfile +++ b/centosstream8-ansible-latest/Dockerfile @@ -4,7 +4,7 @@ ENV container=docker # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ - for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/fedora37-ansible-latest/Dockerfile b/fedora37-ansible-latest/Dockerfile index e54b4c6..5959b04 100644 --- a/fedora37-ansible-latest/Dockerfile +++ b/fedora37-ansible-latest/Dockerfile @@ -3,7 +3,7 @@ LABEL maintainer="Sebastian Gumprich; Nejc Habjan; Diego Louzan; Max Wittig" # Enable systemd. RUN dnf -y install systemd && dnf clean all && \ - for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/fedora38-ansible-latest/Dockerfile b/fedora38-ansible-latest/Dockerfile index b7b089d..5190444 100644 --- a/fedora38-ansible-latest/Dockerfile +++ b/fedora38-ansible-latest/Dockerfile @@ -3,7 +3,7 @@ LABEL maintainer="Sebastian Gumprich, Nejc Habjan, Diego Louzan, Max Wittig" # Enable systemd. RUN dnf -y install systemd && dnf clean all && \ - for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/rocky8-ansible-latest/Dockerfile b/rocky8-ansible-latest/Dockerfile index 30c668b..cfe8f2b 100644 --- a/rocky8-ansible-latest/Dockerfile +++ b/rocky8-ansible-latest/Dockerfile @@ -4,7 +4,7 @@ ENV container=docker # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ - for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done \ + (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ From b2acb76f09cbf2a07e178a460b8f18f6fb0fa697 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 18:05:54 +0200 Subject: [PATCH 11/17] lint: SC1141 properly use for loop Signed-off-by: Martin Schurz --- arch-ansible-latest/Dockerfile | 2 +- centos7-ansible-latest/Dockerfile | 2 +- centos8-ansible-latest/Dockerfile | 2 +- centosstream8-ansible-latest/Dockerfile | 2 +- fedora37-ansible-latest/Dockerfile | 2 +- fedora38-ansible-latest/Dockerfile | 2 +- rocky8-ansible-latest/Dockerfile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch-ansible-latest/Dockerfile b/arch-ansible-latest/Dockerfile index a6f2eb7..9337450 100644 --- a/arch-ansible-latest/Dockerfile +++ b/arch-ansible-latest/Dockerfile @@ -7,7 +7,7 @@ RUN pacman -S -y \ sudo \ systemd \ && \ - (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -vf $i; done) \ + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -vf $i; done; \ rm -vf /lib/systemd/system/multi-user.target.wants/*; \ rm -vf /etc/systemd/system/*.wants/*; \ rm -vf /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/centos7-ansible-latest/Dockerfile b/centos7-ansible-latest/Dockerfile index 1cf43a6..8debb08 100644 --- a/centos7-ansible-latest/Dockerfile +++ b/centos7-ansible-latest/Dockerfile @@ -6,7 +6,7 @@ ENV LC_ALL en_US.UTF-8 # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ - (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done; \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/centos8-ansible-latest/Dockerfile b/centos8-ansible-latest/Dockerfile index 5aa53bc..812f953 100644 --- a/centos8-ansible-latest/Dockerfile +++ b/centos8-ansible-latest/Dockerfile @@ -4,7 +4,7 @@ ENV container=docker # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ - (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done; \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/centosstream8-ansible-latest/Dockerfile b/centosstream8-ansible-latest/Dockerfile index 0c03843..39a9587 100644 --- a/centosstream8-ansible-latest/Dockerfile +++ b/centosstream8-ansible-latest/Dockerfile @@ -4,7 +4,7 @@ ENV container=docker # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ - (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done; \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/fedora37-ansible-latest/Dockerfile b/fedora37-ansible-latest/Dockerfile index 5959b04..c0d6ff4 100644 --- a/fedora37-ansible-latest/Dockerfile +++ b/fedora37-ansible-latest/Dockerfile @@ -3,7 +3,7 @@ LABEL maintainer="Sebastian Gumprich; Nejc Habjan; Diego Louzan; Max Wittig" # Enable systemd. RUN dnf -y install systemd && dnf clean all && \ - (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done; \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/fedora38-ansible-latest/Dockerfile b/fedora38-ansible-latest/Dockerfile index 5190444..cc6ccea 100644 --- a/fedora38-ansible-latest/Dockerfile +++ b/fedora38-ansible-latest/Dockerfile @@ -3,7 +3,7 @@ LABEL maintainer="Sebastian Gumprich, Nejc Habjan, Diego Louzan, Max Wittig" # Enable systemd. RUN dnf -y install systemd && dnf clean all && \ - (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done; \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ diff --git a/rocky8-ansible-latest/Dockerfile b/rocky8-ansible-latest/Dockerfile index cfe8f2b..78f780a 100644 --- a/rocky8-ansible-latest/Dockerfile +++ b/rocky8-ansible-latest/Dockerfile @@ -4,7 +4,7 @@ ENV container=docker # Install systemd -- See https://hub.docker.com/_/centos/ RUN yum -y update; yum clean all; \ - (for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) \ + for i in /lib/systemd/system/sysinit.target.wants/*; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done; \ rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ From f335e2b93a63fac330a82e2413dbd40f90242b8e Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 18:09:28 +0200 Subject: [PATCH 12/17] lint: SC2028 echo is ok Signed-off-by: Martin Schurz --- .hadolint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.hadolint.yaml b/.hadolint.yaml index 0869ef0..ef51e9e 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -6,5 +6,6 @@ ignored: - DL3033 # we don't want to pin versions - DL3041 # we don't want to pin versions - DL3037 # we don't want to pin versions + - SC2028 # using echo is ok for our case - SC3009 # we don't care aboint POSIX compatibility - SC3037 # we don't care aboint POSIX compatibility From 3c7e80ec911758bef704995daf6c0d49ed6b9394 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 18:15:03 +0200 Subject: [PATCH 13/17] lint: DL3009 clean up a bit better after apt Signed-off-by: Martin Schurz --- debian10-ansible-latest/Dockerfile | 9 ++++++--- debian11-ansible-latest/Dockerfile | 5 ++++- debian12-ansible-latest/Dockerfile | 4 +++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/debian10-ansible-latest/Dockerfile b/debian10-ansible-latest/Dockerfile index d8c21ad..b7f5bc1 100644 --- a/debian10-ansible-latest/Dockerfile +++ b/debian10-ansible-latest/Dockerfile @@ -1,12 +1,15 @@ FROM debian:buster LABEL maintainer="Sebastian Gumprich" -RUN apt-get update -y && apt-get install --fix-missing && \ +RUN apt-get update -y && apt-get install -y --fix-missing && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y \ python python-yaml sudo \ - curl gcc python-pip python-dev libffi-dev libssl-dev systemd -RUN pip install --no-cache-dir --upgrade cffi && \ + curl gcc python-pip python-dev libffi-dev libssl-dev systemd && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN pip install --no-cache-dir --upgrade cffi && \ pip install --no-cache-dir ansible RUN apt-get -f -y --auto-remove remove \ diff --git a/debian11-ansible-latest/Dockerfile b/debian11-ansible-latest/Dockerfile index e4af5ef..7eaeb12 100644 --- a/debian11-ansible-latest/Dockerfile +++ b/debian11-ansible-latest/Dockerfile @@ -5,7 +5,10 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missin DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ python3 python3-yaml sudo \ - curl gcc python3-pip python3-dev libffi-dev libssl-dev systemd + curl gcc python3-pip python3-dev libffi-dev libssl-dev systemd && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + RUN pip install --no-cache-dir --upgrade cffi && \ pip install --no-cache-dir ansible diff --git a/debian12-ansible-latest/Dockerfile b/debian12-ansible-latest/Dockerfile index dfd2e14..81674c4 100644 --- a/debian12-ansible-latest/Dockerfile +++ b/debian12-ansible-latest/Dockerfile @@ -5,7 +5,9 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missin DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ python3 python3-yaml sudo \ - curl gcc python3-pip python3-dev libffi-dev libssl-dev systemd + curl gcc python3-pip python3-dev libffi-dev libssl-dev systemd && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* # Allow installing stuff to system Python. RUN rm -f /usr/lib/python3.11/EXTERNALLY-MANAGED From 1ce63048b279f750350620b7b3c63d0aea810d9e Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 18:26:25 +0200 Subject: [PATCH 14/17] lint: SC30XX we don'tcare about POSIX compatibility Signed-off-by: Martin Schurz --- .hadolint.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.hadolint.yaml b/.hadolint.yaml index ef51e9e..c3dd257 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -7,5 +7,6 @@ ignored: - DL3041 # we don't want to pin versions - DL3037 # we don't want to pin versions - SC2028 # using echo is ok for our case - - SC3009 # we don't care aboint POSIX compatibility - - SC3037 # we don't care aboint POSIX compatibility + - SC3009 # we don't care about POSIX compatibility + - SC3010 # we don't care about POSIX compatibility + - SC3037 # we don't care about POSIX compatibility From 480d960408ee9df542a6b13a5ad6aa5ed354c9e1 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 18:31:38 +0200 Subject: [PATCH 15/17] last fixes Signed-off-by: Martin Schurz --- arch-ansible-latest/Dockerfile | 2 +- openwrt-ansible-latest/Dockerfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch-ansible-latest/Dockerfile b/arch-ansible-latest/Dockerfile index 9337450..09c8370 100644 --- a/arch-ansible-latest/Dockerfile +++ b/arch-ansible-latest/Dockerfile @@ -26,7 +26,7 @@ RUN pacman -S -y \ glibc \ python \ ansible \ - && yes | pacman -Scc || true + && pacman -Scc --noconfirm || true # Install Ansible inventory file. RUN mkdir /etc/ansible \ diff --git a/openwrt-ansible-latest/Dockerfile b/openwrt-ansible-latest/Dockerfile index 84d19b8..5b3e128 100644 --- a/openwrt-ansible-latest/Dockerfile +++ b/openwrt-ansible-latest/Dockerfile @@ -3,6 +3,7 @@ LABEL maintainer="Sebastian Gumprich" RUN mkdir -p /var/lock && \ opkg update && \ + set -o pipefail && \ if [[ $(opkg list-upgradable) ]]; then opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade; fi && \ opkg install python3 python3-pip python3-cryptography \ sudo bash sed shadow-su shadow-groupadd shadow-useradd shadow-usermod From 491ea3d5e5d7776bbc16d32713196f41795accbe Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 18:34:33 +0200 Subject: [PATCH 16/17] ignore openwrt problem Signed-off-by: Martin Schurz --- openwrt-ansible-latest/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwrt-ansible-latest/Dockerfile b/openwrt-ansible-latest/Dockerfile index 5b3e128..965e94d 100644 --- a/openwrt-ansible-latest/Dockerfile +++ b/openwrt-ansible-latest/Dockerfile @@ -1,9 +1,9 @@ FROM openwrt/rootfs:latest LABEL maintainer="Sebastian Gumprich" +# hadolint ignore=DL4006 RUN mkdir -p /var/lock && \ opkg update && \ - set -o pipefail && \ if [[ $(opkg list-upgradable) ]]; then opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade; fi && \ opkg install python3 python3-pip python3-cryptography \ sudo bash sed shadow-su shadow-groupadd shadow-useradd shadow-usermod From 3c7275aab232d97a4dde3ee6feb3f0525d8cc1a2 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Tue, 17 Oct 2023 18:57:04 +0200 Subject: [PATCH 17/17] increase failure threshold Signed-off-by: Martin Schurz --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bf96550..12da54b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,3 +15,4 @@ jobs: - uses: hadolint/hadolint-action@v3.1.0 with: recursive: true + failure-threshold: warning # info is usually ok