Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Linting Results for Dockerfile #5

Open
Artiume opened this issue Jan 31, 2020 · 0 comments
Open

Linting Results for Dockerfile #5

Artiume opened this issue Jan 31, 2020 · 0 comments

Comments

@Artiume
Copy link

Artiume commented Jan 31, 2020

Using hadelint against the main dockerfile, gives the following results:

/dev/stdin:6 DL3003 Use WORKDIR to switch to a directory
/dev/stdin:6 DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
/dev/stdin:6 DL3019 Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
/dev/stdin:6 DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
/dev/stdin:33 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Posting here for reference later

Easy to use command docker run --rm -i hadolint/hadolint < Dockerfile

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant