Skip to content

Fix all hadolint warnings in Dockerfile#87

Merged
yaronkoren merged 3 commits intomasterfrom
fix-dockerfile-lint
Feb 13, 2026
Merged

Fix all hadolint warnings in Dockerfile#87
yaronkoren merged 3 commits intomasterfrom
fix-dockerfile-lint

Conversation

@cicalese
Copy link
Contributor

@cicalese cicalese commented Feb 13, 2026

Summary

  • Add SHELL pipefail directive before piped RUN commands
  • Add --no-install-recommends to apt-get/aptitude install
  • Replace apt with apt-get for postfix install
  • Clean up apt lists after postfix install
  • Double-quote all variable references in RUN commands
  • Add cd || exit for safety
  • Suppress DL3008 (pin versions) — impractical for Debian system packages
  • Suppress DL3003 (use WORKDIR) — cd is used within multi-command && chains

Closes #86

Test plan

  • hadolint Dockerfile produces no output
  • Image builds successfully

- Add SHELL pipefail before piped RUN commands (DL4006)
- Add --no-install-recommends to apt-get/aptitude install (DL3015)
- Replace apt with apt-get for postfix install (DL3027)
- Clean up apt lists after postfix install (DL3009)
- Double-quote all variable references in RUN commands (SC2086)
- Add cd || exit for safety (SC2164)
- Suppress DL3008 (pin versions) — impractical for Debian system packages
- Suppress DL3003 (use WORKDIR) — cd is used within multi-command chains
Move explanatory comments to separate lines above hadolint ignore
directives (inline -- comments are not supported by hadolint).
Use --without-recommends instead of --no-install-recommends for
aptitude.
@github-actions
Copy link

🐳 The image based on 7f47b3f8 commit has been built with 1.43.6-20260213-87 tag as ghcr.io/canastawiki/canasta-base:1.43.6-20260213-87

@cicalese cicalese marked this pull request as ready for review February 13, 2026 15:49
@yaronkoren yaronkoren merged commit 676260c into master Feb 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix hadolint warnings in Dockerfile

2 participants