Skip to content

feat(docker): switch to distroless - #2164

Open
zekth wants to merge 3 commits into
mainfrom
feat/dockerfile-distroless
Open

feat(docker): switch to distroless#2164
zekth wants to merge 3 commits into
mainfrom
feat/dockerfile-distroless

Conversation

@zekth

@zekth zekth commented Jul 21, 2026

Copy link
Copy Markdown
Member

To avoid having security issues imported from many deps that alpine pulls, switching the docker image to distroless.

@codecov-commenter

codecov-commenter commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 35.92%. Comparing base (9d72b30) to head (3abd9e6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2164   +/-   ##
=======================================
  Coverage   35.92%   35.92%           
=======================================
  Files          82       82           
  Lines        7832     7832           
=======================================
  Hits         2814     2814           
  Misses       4753     4753           
  Partials      265      265           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Prashansa-K Prashansa-K added skip-konnect Skip Konnect Integration tests in CI skip-ee Skip Enterprise Integration Tests in CI skip-oss Skip Open Source Integration Tests in CI labels Jul 22, 2026
@zekth
zekth force-pushed the feat/dockerfile-distroless branch 2 times, most recently from 07f8edd to 64eacfe Compare July 27, 2026 07:51
@Prashansa-K
Prashansa-K force-pushed the feat/dockerfile-distroless branch from 9355080 to 857b241 Compare August 3, 2026 04:27
@Prashansa-K

Copy link
Copy Markdown
Contributor

@harshadixit12 I have added a few changes to the original PR here. Please review.
Here's a gist of my changes:

  • Updated the runtime base image from gcr.io/distroless/base to gcr.io/distroless/static-debian12:nonroot. distroless/base had pushed the final image size to 104 MB (36% larger than our current alpine based one). Both deck (CGO_ENABLED=0) and the bundled jq are statically linked, so the glibc base isn't needed. Moving to distroless/static brings the image down to 70.7 MB while keeping non-root and jq intact.
  • I also set the HOME env variable as deck resolves $HOME on startup, and distroless has no shell/getent fallback. Adding a HOME explicitly here ensures that the binary doesn't panic in case a runtime leaves $HOME unset. This is less likely to happen but I erred on the side of caution.

Verified locally with podman: deck runs, jq works and the container runs as nonroot.

@zekth

zekth commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

had pushed the final image size to 104 MB (36% larger than our current alpine based one)

thats not great :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-ee Skip Enterprise Integration Tests in CI skip-konnect Skip Konnect Integration tests in CI skip-oss Skip Open Source Integration Tests in CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants