From cfed0cb7a8adbd34b82ef569eec9a286653dfc99 Mon Sep 17 00:00:00 2001 From: Cristovao Cordeiro Date: Wed, 1 Mar 2023 10:47:10 +0100 Subject: [PATCH 1/2] Fix Hadolint error wrt 'find' over 'ls' --- chiselled-jre/Dockerfile.22.04 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chiselled-jre/Dockerfile.22.04 b/chiselled-jre/Dockerfile.22.04 index da03f82..5c25780 100644 --- a/chiselled-jre/Dockerfile.22.04 +++ b/chiselled-jre/Dockerfile.22.04 @@ -36,7 +36,7 @@ RUN mkdir -p /rootfs \ media-types_data \ libjpeg-turbo8_libs \ base-files_bin \ - && ln -s $(ls /rootfs/usr/lib/jvm/java-8-openjdk-*/jre/bin/java | sed 's/\/rootfs//') /rootfs/usr/bin/ + && ln -s "$(find /rootfs/usr/lib/jvm/java-8-openjdk-*/jre/bin -name java | sed 's/\/rootfs//')" /rootfs/usr/bin/ RUN install -d -m 0755 -o $UID -g $GID /rootfs/home/$USER \ && echo -e "root:x:0:\n$GROUP:x:$GID:" >/rootfs/etc/group \ && echo -e "root:x:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" >/rootfs/etc/passwd From 621c34026df81826a1caada2858f580158b272ce Mon Sep 17 00:00:00 2001 From: Cristovao Cordeiro Date: Wed, 1 Mar 2023 10:49:24 +0100 Subject: [PATCH 2/2] Add Hadolint to CI tests --- .github/workflows/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e5d6f05..28efb3d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -91,6 +91,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + # Lint the Dockerfiles + - name: Lint the Dockerfile + uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: chiselled-jre/Dockerfile.${{ matrix.ubuntu-release }} + ignore: DL3008,DL3015,SC3028 + - name: Build the chiselled-jre image run: | docker buildx build \