Skip to content

fix(docker): run containers as non-root user and update alpine to 3.21#1674

Open
rohilsurana wants to merge 1 commit into
mainfrom
fix/docker-run-as-nonroot
Open

fix(docker): run containers as non-root user and update alpine to 3.21#1674
rohilsurana wants to merge 1 commit into
mainfrom
fix/docker-run-as-nonroot

Conversation

@rohilsurana
Copy link
Copy Markdown
Member

Summary

  • Both Dockerfile and Dockerfile.dev ran as root (no USER directive)
  • Added non-root frontier user and USER frontier directive to both
  • Updated base image from alpine:3.18 (June 2023, approaching EOL) to alpine:3.21

Why this is safe

  • Frontier binds to ports 8002, 9000, 8083 — all >1024, no root needed
  • Zero file writes at runtime — no os.Create/os.Write/os.Mkdir in app code
  • Binary at /usr/bin/frontier only needs read+execute, not ownership
  • Config files are read-only at runtime

Test plan

  • Build production image: docker build -t frontier-test .
  • Build dev image: docker build -f Dockerfile.dev -t frontier-dev-test .
  • Verify process runs as non-root: docker exec <container> whoamifrontier
  • Verify all ports (8002, 9000, 8083) respond normally
  • Verify mounted config files are readable by the frontier user

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Jun 3, 2026 5:15pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Warning

Review limit reached

@rohilsurana, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 16 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c6b012b1-3c09-4e40-aefe-513b8b61a103

📥 Commits

Reviewing files that changed from the base of the PR and between 2e93a90 and 71f0714.

📒 Files selected for processing (2)
  • Dockerfile
  • Dockerfile.dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 26900932352

Coverage remained the same at 43.138%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 38013
Covered Lines: 16398
Line Coverage: 43.14%
Coverage Strength: 12.08 hits per line

💛 - Coveralls

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.

2 participants