Skip to content

fix(docker): Improve Docker build reproducibility and runtime permissions - #124

Open
Aditya030207 wants to merge 2 commits into
Flagsmith:mainfrom
Aditya030207:codex/non-root-cli-container
Open

Aditya030207 wants to merge 2 commits into
Flagsmith:mainfrom
Aditya030207:codex/non-root-cli-container

Conversation

@Aditya030207

Copy link
Copy Markdown
Contributor

The CLI container currently uses a moving Alpine tag and runs as root by default. Pinning the base image and using an unprivileged runtime account make the published image more predictable and reduce the permissions used for everyday CLI commands.

Changes

  • Pin both stages to the same multi-platform Alpine image.
  • Run the CLI with an unprivileged user and writable working and home directories.
  • Document how to use the host user's permissions for a writable bind mount.

Closes #63

How did you test this code?

  • Passed go test -race ./....
  • Cross-compiled the CLI for Linux AMD64 and ARM64 and verified that the pinned image index has both platforms.
  • Docker was unavailable locally, so the built-image smoke test is pending.

Review effort: 2/5

@Aditya030207
Aditya030207 requested a review from a team as a code owner November 27, 2026 13:37
@Aditya030207
Aditya030207 requested review from emyller and a balanced review from Copilot and removed request for a team November 27, 2026 13:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread README.md Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval skipped because this PR is from an external contributor.

Re-trigger cubic

This branch has not been deployed

No deployments
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.

Improve Docker build

2 participants