Skip to content

lifecycle/container: add a distroless version of the server image - #26321

Merged
emilburzo merged 6 commits into
container-test-kitfrom
distroless-image
Oct 21, 2026
Merged

emilburzo merged 6 commits into
container-test-kitfrom
distroless-image

Conversation

@emilburzo

@emilburzo emilburzo commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

No description provided.

@emilburzo emilburzo self-assigned this Sep 21, 2026
@emilburzo
emilburzo added this pull request to stack #26322 September 21, 2026 15:50
@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.38%. Comparing base (c16c6bd) to head (21f608e).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           container-test-kit   #26321      +/-   ##
======================================================
+ Coverage               92.37%   92.38%   +0.01%     
======================================================
  Files                    1189     1190       +1     
  Lines                   80137    80148      +11     
  Branches                 4351     4351              
======================================================
+ Hits                    74023    74044      +21     
+ Misses                   6048     6038      -10     
  Partials                   66       66              
Flag Coverage Δ
conformance 32.30% <0.00%> (-0.01%) ⬇️
e2e 36.98% <0.00%> (-0.01%) ⬇️
integration 29.19% <0.00%> (-0.01%) ⬇️
rust 44.42% <ø> (ø)
unit 94.03% <100.00%> (+0.01%) ⬆️
unit-migrate 94.03% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@netlify

netlify Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 8029c37
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6acf36590a72e9328283818a
😎 Deploy Preview https://deploy-preview-26321--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 8029c37
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6acf3659bfdf1c5de069f565
😎 Deploy Preview https://deploy-preview-26321--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e

Download this run's HTML report and traces, then open the report:

gh run download 39631666753 -D playwright-artifacts
npx playwright show-report playwright-artifacts/playwright-report

Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-21f608e1991417b770670297f71f3fae202b3ee5
# Distroless image: AUTHENTIK_TAG=gh-21f608e1991417b770670297f71f3fae202b3ee5-distroless
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-21f608e1991417b770670297f71f3fae202b3ee5
        # Distroless image: tag: gh-21f608e1991417b770670297f71f3fae202b3ee5-distroless

Afterwards, run the upgrade commands from the latest release notes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The final image omits required merged-/usr symlinks, and two build stages still reference temporary upstream PR images.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Converts the authentik server image to a curated, distroless filesystem built from scratch.

Changes:

  • Adds package, runtime-path, and exclusion allowlists.
  • Adds a pruning script to assemble the minimal root filesystem.
  • Preserves the unpruned debug image.
File Description
lifecycle/​container/​runtime-paths.txt Lists non-package runtime files.
lifecycle/​container/​runtime-packages.txt Lists retained Debian packages.
lifecycle/​container/​runtime-drop.txt Removes development and interactive tooling.
lifecycle/​container/​prune.sh Builds the pruned filesystem.
lifecycle/​container/​Dockerfile Creates the scratch-based final image.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lifecycle/container/prune.sh Resolved
Comment thread lifecycle/container/Dockerfile Resolved
@emilburzo
emilburzo marked this pull request as ready for review September 22, 2026 08:31
@emilburzo
emilburzo requested a review from a team as a code owner September 22, 2026 08:31
@emilburzo emilburzo moved this from Todo to Needs review in authentik Core Sep 22, 2026

@dominic-r dominic-r left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was trying it out for myself and had 2 questions

# writable mount points
/certs
/data
/media

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 2025.12, this has moved to /data, so I feel like this should be removed. It's nearly been a year

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing it could break pre-2025.12 setups though, right? or did we force-migrate it somehow?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like it's still symlinked:

ln -s /media /data/media && \

-> I'd keep it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing it could break pre-2025.12 setups though, right? or did we force-migrate it somehow?

if ur running pre .12 a year later that's kind of on you plus the .12 images were already published (with the appropriate paths) so it shouldn't be an issue unless we're planning on backfilling the rootless images, which we shouldn't imo

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I mean if you had setup authentik pre-2025.12, you probably have /media

existing setups didn't break past 2025.12 because of this symlink:

ln -s /media /data/media && \

-> removing it would break that setup


it's far less of an issue now that distroless is not the "main" image, but then again what's the harm in keeping it?

@emilburzo
emilburzo removed this pull request from stack #26322 September 28, 2026 16:50
@emilburzo
emilburzo changed the base branch from distroless-entrypoint to container-test-kit September 28, 2026 16:50
@emilburzo
emilburzo added this pull request to stack #26511 September 28, 2026 16:50
@netlify

netlify Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 8029c37
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6acf3659ef02acd114764e3d
😎 Deploy Preview https://deploy-preview-26321--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@emilburzo
emilburzo requested review from a team as code owners September 29, 2026 09:15
@emilburzo
emilburzo force-pushed the distroless-image branch 3 times, most recently from a09ba4c to 1e2d518 Compare October 1, 2026 08:23
Comment thread lifecycle/container/Dockerfile Resolved
Comment thread lifecycle/container/Dockerfile Resolved
Comment thread lifecycle/container/Dockerfile Resolved
Comment thread lifecycle/container/Dockerfile Resolved
@emilburzo
emilburzo force-pushed the distroless-image branch 4 times, most recently from 7488c5e to 40cd7b3 Compare October 14, 2026 17:59
@github-project-automation github-project-automation Bot moved this from Needs review to In Progress in authentik Core Oct 21, 2026
emilburzo and others added 6 commits October 21, 2026 19:05
@emilburzo
emilburzo merged commit 088d72e into main Oct 21, 2026
171 checks passed
@emilburzo
emilburzo deleted the distroless-image branch October 21, 2026 16:42
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Oct 21, 2026
kensternberg-authentik added a commit that referenced this pull request Oct 22, 2026
* main: (21 commits)
  root: require Node.js 24.22.1 (#27093)
  website/docs: change routing info after 2026.8 changes (#27109)
  core: bump astral-sh/uv from 0.13.4 to 0.13.5 in /lifecycle/container (#27096)
  flows: avoid saving plan history when inspector inaccessible (#27089)
  core: bump pyo3 from 0.29.0 to 0.30.1 (#27099)
  core: bump arc-swap from 1.9.2 to 1.9.3 (#27098)
  core: bump pyroscope-io from 1.2.5 to 1.3.0 (#27100)
  core: bump pyo3-build-config from 0.29.0 to 0.30.1 (#27097)
  core: bump dexidp/dex from v2.46.0 to v2.46.1 in /tests/e2e (#27095)
  website/integrations: VCF 9: touch up (#27094)
  lifecycle/container: add a distroless version of the server image (#26321)
  ci: run tests in the server image (#26510)
  packages/client-ts: Generate imports with `.js` extensions (#27029)
  core: bump djangorestframework from 3.18.1 to 3.18.3 (#26838)
  website/docs: add release notes for `2026.8.5` (#27084)
  website/docs: add release notes for `2026.5.8` (#27083)
  core, web: update translations (#27035)
  core: bump twilio from 9.11.2 to 9.12.0 (#27081)
  core: bump cachetools from 7.2.2 to 7.2.3 (#27082)
  core: bump paramiko from 5.0.0 to 5.0.1 (#27080)
  ...
kensternberg-authentik added a commit that referenced this pull request Oct 22, 2026
…ts/sidebar-api-disconnect

* web/elements/sidebar-footer-dependency: (27 commits)
  The test exists and passes.
  Moving the load of the AdminOverviewPage to the entrypoint. The idea is to have the dashboard as live as possible as early as possible.  Putting into Routes made Routes into a browser-only feature, and it could not be unit tested without this move.
  web/elements: test that ak-mdx does not evaluate API-supplied content (#24524)
  root: require Node.js 24.22.1 (#27093)
  Formatter opinions.
  That side effect infected downstream tests. Darnit.
  web/admin: Simplify sidebar entries handling
  website/docs: change routing info after 2026.8 changes (#27109)
  core: bump astral-sh/uv from 0.13.4 to 0.13.5 in /lifecycle/container (#27096)
  flows: avoid saving plan history when inspector inaccessible (#27089)
  core: bump pyo3 from 0.29.0 to 0.30.1 (#27099)
  core: bump arc-swap from 1.9.2 to 1.9.3 (#27098)
  core: bump pyroscope-io from 1.2.5 to 1.3.0 (#27100)
  core: bump pyo3-build-config from 0.29.0 to 0.30.1 (#27097)
  core: bump dexidp/dex from v2.46.0 to v2.46.1 in /tests/e2e (#27095)
  website/integrations: VCF 9: touch up (#27094)
  lifecycle/container: add a distroless version of the server image (#26321)
  ci: run tests in the server image (#26510)
  packages/client-ts: Generate imports with `.js` extensions (#27029)
  core: bump djangorestframework from 3.18.1 to 3.18.3 (#26838)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants