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 \ 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