Skip to content

Commit

Permalink
feat(sage-monorepo): lint staged Dockerfiles with Hadolint (ARCH-278) (
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter authored Sep 17, 2024
1 parent 0cd939c commit 96393a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ignored:
# Pin versions in apt-get install.
# Pin versions in `apt-get install`.
# Reason: Identifying the versions of apt packages is not trivial. The versions available would
# also differ for different base images. This decision should be re-evaluated periodically.
- DL3008
# Pin versions in apt get install.
# Pin versions in `apk add`.
# Reason: Identifying the versions of apk packages is not trivial. The versions available would
# also differ for different base images. This decision should be re-evaluated periodically.
- DL3018
5 changes: 5 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ module.exports = {
// Lint the projects affected by the staged files
`nx affected --target=lint --files=${filenames.join(',')}`,
],

'**/*[dD]ockerfile*': (filenames) => [
// Lint Dockerfiles with Hadolint
`hadolint ${filenames.join(' ')}`,
],
};
1 change: 0 additions & 1 deletion tools/devcontainers/sage/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ ENV DEVCONTAINER_VERSION=${devcontainerVersion} \
LC_ALL=en_US.UTF-8

# Install system packages
# hadolint ignore=DL3008
RUN apt-get update -qq -y && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install --no-install-recommends -qq -y \
ca-certificates curl git bash-completion gnupg2 lsb-release ssh sudo \
Expand Down

0 comments on commit 96393a2

Please sign in to comment.