fix: make Docker images backward compatible with runAsUser: 1000#982
fix: make Docker images backward compatible with runAsUser: 1000#982
Conversation
- Remove --chown=65532:65532 from COPY for non-FIPS builds - Add chmod -R a+rX so files are world-readable regardless of uid - FIPS/DHI builds pass NONROOT_CHOWN=true for proper nonroot ownership Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This PR updates the Docker build process to enhance backward compatibility with Kubernetes environments that use Files Changed Analysis
Architecture & Impact Assessment
Build Logic Flowgraph TD
subgraph "Docker Build (ci/Dockerfile.distroless)"
A[Start Build] --> B[Install .deb package];
B --> C[Make files world-readable];
C --> D{NONROOT_CHOWN == true?};
D -- Yes --> E[chown to non-root user];
D -- No --> F[Skip chown];
E --> G[Copy files to final image];
F --> G;
end
subgraph "CI/CD (.github/workflows/release.yml)"
H[Release Workflow] --> I{Is it a FIPS build?};
I -- Yes --> J[Build with NONROOT_CHOWN=true];
I -- No --> K[Build with default NONROOT_CHOWN=false];
end
J --> A;
K --> A;
Scope Discovery & Context ExpansionThe changes are confined to the Docker packaging and CI/CD pipeline, directly affecting how the Metadata
Powered by Visor from Probelabs Last updated: 2026-04-20T16:51:54.924Z | Triggered by: pr_opened | Commit: 275d9f6 💡 TIP: You can chat with Visor using |
Security Issues (1)
✅ Architecture Check PassedNo architecture issues found – changes LGTM. Security Issues (1)
No architecture issues found – changes LGTM. \n\n✅ Performance Check PassedNo performance issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2026-04-20T16:51:13.326Z | Triggered by: pr_opened | Commit: 275d9f6 💡 TIP: You can chat with Visor using |
|




Summary
--chown=65532:65532fromCOPYinci/Dockerfile.distrolessso non-FIPS images work with any UID (e.g.runAsUser: 1000)chmod -R a+rXafter dpkg install so files are world-readable regardless of container uidNONROOT_CHOWN=truebuild arg to preserve explicit nonroot ownershipTest plan
runAsUser: 1000runAsUser: 65532🤖 Generated with Claude Code