[GH-ISSUE #522] Interested in a linting task for the various Dockerfiles in this repo? #330

Closed
opened 2026-03-03 01:28:02 +03:00 by kerem · 3 comments
Owner

Originally created by @fbartels on GitHub (Jul 3, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/522

Hi,

I have just run hadolint ontop of the latest pr for updating the Dockerfiles and it prints out the following:

 $  git ls-files --exclude='Dockerfile*' --ignored | xargs --max-lines=1 hadolint
Dockerfile:5 DL3006 Always tag the version of an image explicitly
Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
Dockerfile:24 DL3006 Always tag the version of an image explicitly
Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
Dockerfile:96 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/aarch64/mysql/Dockerfile:5 DL3006 Always tag the version of an image explicitly
docker/aarch64/mysql/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/aarch64/mysql/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
docker/aarch64/mysql/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/aarch64/mysql/Dockerfile:24 DL3006 Always tag the version of an image explicitly
docker/aarch64/mysql/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/aarch64/mysql/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/aarch64/mysql/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/aarch64/mysql/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/aarch64/mysql/Dockerfile:76 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/aarch64/mysql/Dockerfile:97 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/aarch64/sqlite/Dockerfile:5 DL3006 Always tag the version of an image explicitly
docker/aarch64/sqlite/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/aarch64/sqlite/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
docker/aarch64/sqlite/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/aarch64/sqlite/Dockerfile:24 DL3006 Always tag the version of an image explicitly
docker/aarch64/sqlite/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/aarch64/sqlite/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/aarch64/sqlite/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/aarch64/sqlite/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/aarch64/sqlite/Dockerfile:76 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/aarch64/sqlite/Dockerfile:97 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/amd64/mysql/Dockerfile:5 DL3006 Always tag the version of an image explicitly
docker/amd64/mysql/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/amd64/mysql/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
docker/amd64/mysql/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/amd64/mysql/Dockerfile:24 DL3006 Always tag the version of an image explicitly
docker/amd64/mysql/Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/amd64/mysql/Dockerfile:96 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/amd64/mysql/Dockerfile.alpine:5 DL3006 Always tag the version of an image explicitly
docker/amd64/mysql/Dockerfile.alpine:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/amd64/mysql/Dockerfile.alpine:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/amd64/mysql/Dockerfile.alpine:31 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/amd64/mysql/Dockerfile.alpine:60 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/amd64/mysql/Dockerfile.alpine:76 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/amd64/sqlite/Dockerfile:5 DL3006 Always tag the version of an image explicitly
docker/amd64/sqlite/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/amd64/sqlite/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
docker/amd64/sqlite/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/amd64/sqlite/Dockerfile:24 DL3006 Always tag the version of an image explicitly
docker/amd64/sqlite/Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/amd64/sqlite/Dockerfile:96 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/amd64/sqlite/Dockerfile.alpine:5 DL3006 Always tag the version of an image explicitly
docker/amd64/sqlite/Dockerfile.alpine:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/amd64/sqlite/Dockerfile.alpine:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/amd64/sqlite/Dockerfile.alpine:31 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/amd64/sqlite/Dockerfile.alpine:60 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/amd64/sqlite/Dockerfile.alpine:76 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/armv6/mysql/Dockerfile:5 DL3006 Always tag the version of an image explicitly
docker/armv6/mysql/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/armv6/mysql/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
docker/armv6/mysql/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/armv6/mysql/Dockerfile:24 DL3006 Always tag the version of an image explicitly
docker/armv6/mysql/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv6/mysql/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/armv6/mysql/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv6/mysql/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/armv6/mysql/Dockerfile:76 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv6/mysql/Dockerfile:97 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/armv6/sqlite/Dockerfile:5 DL3006 Always tag the version of an image explicitly
docker/armv6/sqlite/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/armv6/sqlite/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
docker/armv6/sqlite/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/armv6/sqlite/Dockerfile:24 DL3006 Always tag the version of an image explicitly
docker/armv6/sqlite/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv6/sqlite/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/armv6/sqlite/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv6/sqlite/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/armv6/sqlite/Dockerfile:76 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv6/sqlite/Dockerfile:97 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/armv7/mysql/Dockerfile:5 DL3006 Always tag the version of an image explicitly
docker/armv7/mysql/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/armv7/mysql/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
docker/armv7/mysql/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/armv7/mysql/Dockerfile:24 DL3006 Always tag the version of an image explicitly
docker/armv7/mysql/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv7/mysql/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/armv7/mysql/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv7/mysql/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/armv7/mysql/Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv7/mysql/Dockerfile:98 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments
docker/armv7/sqlite/Dockerfile:5 DL3006 Always tag the version of an image explicitly
docker/armv7/sqlite/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
docker/armv7/sqlite/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
docker/armv7/sqlite/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it
docker/armv7/sqlite/Dockerfile:24 DL3006 Always tag the version of an image explicitly
docker/armv7/sqlite/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv7/sqlite/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/armv7/sqlite/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv7/sqlite/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends`
docker/armv7/sqlite/Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
docker/armv7/sqlite/Dockerfile:98 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments

Quite a lot of this is duplicate and not all recommendations really need to be followed (pinning exact package version imho just makes sense if you want to spent resources on constantly updating your dockerfiles).

If you like I could add hadolint as a step to the travis.yml and also work a bit on resolving these warnings.

Originally created by @fbartels on GitHub (Jul 3, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/522 Hi, I have just run hadolint ontop of the [latest pr for updating the Dockerfiles](https://github.com/dani-garcia/bitwarden_rs/pull/521) and it prints out the following: ``` $ git ls-files --exclude='Dockerfile*' --ignored | xargs --max-lines=1 hadolint Dockerfile:5 DL3006 Always tag the version of an image explicitly Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it Dockerfile:24 DL3006 Always tag the version of an image explicitly Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` Dockerfile:96 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/aarch64/mysql/Dockerfile:5 DL3006 Always tag the version of an image explicitly docker/aarch64/mysql/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/aarch64/mysql/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages docker/aarch64/mysql/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/aarch64/mysql/Dockerfile:24 DL3006 Always tag the version of an image explicitly docker/aarch64/mysql/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/aarch64/mysql/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/aarch64/mysql/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/aarch64/mysql/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/aarch64/mysql/Dockerfile:76 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/aarch64/mysql/Dockerfile:97 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/aarch64/sqlite/Dockerfile:5 DL3006 Always tag the version of an image explicitly docker/aarch64/sqlite/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/aarch64/sqlite/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages docker/aarch64/sqlite/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/aarch64/sqlite/Dockerfile:24 DL3006 Always tag the version of an image explicitly docker/aarch64/sqlite/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/aarch64/sqlite/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/aarch64/sqlite/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/aarch64/sqlite/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/aarch64/sqlite/Dockerfile:76 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/aarch64/sqlite/Dockerfile:97 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/amd64/mysql/Dockerfile:5 DL3006 Always tag the version of an image explicitly docker/amd64/mysql/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/amd64/mysql/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages docker/amd64/mysql/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/amd64/mysql/Dockerfile:24 DL3006 Always tag the version of an image explicitly docker/amd64/mysql/Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/amd64/mysql/Dockerfile:96 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/amd64/mysql/Dockerfile.alpine:5 DL3006 Always tag the version of an image explicitly docker/amd64/mysql/Dockerfile.alpine:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/amd64/mysql/Dockerfile.alpine:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/amd64/mysql/Dockerfile.alpine:31 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/amd64/mysql/Dockerfile.alpine:60 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/amd64/mysql/Dockerfile.alpine:76 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/amd64/sqlite/Dockerfile:5 DL3006 Always tag the version of an image explicitly docker/amd64/sqlite/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/amd64/sqlite/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages docker/amd64/sqlite/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/amd64/sqlite/Dockerfile:24 DL3006 Always tag the version of an image explicitly docker/amd64/sqlite/Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/amd64/sqlite/Dockerfile:96 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/amd64/sqlite/Dockerfile.alpine:5 DL3006 Always tag the version of an image explicitly docker/amd64/sqlite/Dockerfile.alpine:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/amd64/sqlite/Dockerfile.alpine:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/amd64/sqlite/Dockerfile.alpine:31 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/amd64/sqlite/Dockerfile.alpine:60 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/amd64/sqlite/Dockerfile.alpine:76 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/armv6/mysql/Dockerfile:5 DL3006 Always tag the version of an image explicitly docker/armv6/mysql/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/armv6/mysql/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages docker/armv6/mysql/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/armv6/mysql/Dockerfile:24 DL3006 Always tag the version of an image explicitly docker/armv6/mysql/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv6/mysql/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/armv6/mysql/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv6/mysql/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/armv6/mysql/Dockerfile:76 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv6/mysql/Dockerfile:97 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/armv6/sqlite/Dockerfile:5 DL3006 Always tag the version of an image explicitly docker/armv6/sqlite/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/armv6/sqlite/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages docker/armv6/sqlite/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/armv6/sqlite/Dockerfile:24 DL3006 Always tag the version of an image explicitly docker/armv6/sqlite/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv6/sqlite/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/armv6/sqlite/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv6/sqlite/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/armv6/sqlite/Dockerfile:76 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv6/sqlite/Dockerfile:97 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/armv7/mysql/Dockerfile:5 DL3006 Always tag the version of an image explicitly docker/armv7/mysql/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/armv7/mysql/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages docker/armv7/mysql/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/armv7/mysql/Dockerfile:24 DL3006 Always tag the version of an image explicitly docker/armv7/mysql/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv7/mysql/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/armv7/mysql/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv7/mysql/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/armv7/mysql/Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv7/mysql/Dockerfile:98 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments docker/armv7/sqlite/Dockerfile:5 DL3006 Always tag the version of an image explicitly docker/armv7/sqlite/Dockerfile:11 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>` docker/armv7/sqlite/Dockerfile:11 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages docker/armv7/sqlite/Dockerfile:18 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it docker/armv7/sqlite/Dockerfile:24 DL3006 Always tag the version of an image explicitly docker/armv7/sqlite/Dockerfile:29 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv7/sqlite/Dockerfile:29 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/armv7/sqlite/Dockerfile:42 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv7/sqlite/Dockerfile:42 DL3015 Avoid additional packages by specifying `--no-install-recommends` docker/armv7/sqlite/Dockerfile:77 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>` docker/armv7/sqlite/Dockerfile:98 DL3025 Use arguments JSON notation for CMD and ENTRYPOINT arguments ``` Quite a lot of this is duplicate and not all recommendations really need to be followed (pinning exact package version imho just makes sense if you want to spent resources on constantly updating your dockerfiles). If you like I could add hadolint as a step to the travis.yml and also work a bit on resolving these warnings.
kerem closed this issue 2026-03-03 01:28:03 +03:00
Author
Owner

@dani-garcia commented on GitHub (Jul 3, 2019):

Well my knowledge of docker is quite simple so I'm going to assume whoever made that tool knows more than me lol. So yeah, feel free to modify the dockerfiles to reduce the warnings!

I won't mind having this step integrated in CI, but it's not like these files get modified often at all, so maybe it's not worth the effort.

<!-- gh-comment-id:508247817 --> @dani-garcia commented on GitHub (Jul 3, 2019): Well my knowledge of docker is quite simple so I'm going to assume whoever made that tool knows more than me lol. So yeah, feel free to modify the dockerfiles to reduce the warnings! I won't mind having this step integrated in CI, but it's not like these files get modified often at all, so maybe it's not worth the effort.
Author
Owner

@fbartels commented on GitHub (Jul 4, 2019):

OK, will likely look into this over the weekend.

<!-- gh-comment-id:508359388 --> @fbartels commented on GitHub (Jul 4, 2019): OK, will likely look into this over the weekend.
Author
Owner

@mprasil commented on GitHub (Jul 7, 2019):

I think we can close this and continue discussion in #525

<!-- gh-comment-id:509007917 --> @mprasil commented on GitHub (Jul 7, 2019): I think we can close this and continue discussion in #525
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#330
No description provided.