- Install the hadolint binary: https://github.com/hadolint/hadolint/releases
- In VSCode install the hadolint extension
- Open a
Dockerfile
in VSCode and enjoy - Add a lint job to your pipeline
lint_dockerfile:
stage: build
image: hadolint/hadolint:latest-debian
script:
- hadolint Dockerfile
- Install the gitlab workflow extension
- Confirm the gitlab URL and personal access token
- Open a
.gitlab-ci
file in VSCode and enjoy