Skip to content

Comments

Fix runAsNonRoot with non-numeric USER in webapp Dockerfile#46

Merged
dcruver merged 2 commits intomainfrom
fix/webapp-numeric-uid
Feb 20, 2026
Merged

Fix runAsNonRoot with non-numeric USER in webapp Dockerfile#46
dcruver merged 2 commits intomainfrom
fix/webapp-numeric-uid

Conversation

@dcruver
Copy link
Collaborator

@dcruver dcruver commented Feb 20, 2026

Summary

  • Kubernetes rejects pods with runAsNonRoot: true when the container image specifies a non-numeric USER directive, since it can't verify the named user isn't root
  • Pin appuser/appgroup to UID/GID 999 explicitly and use USER 999 in the Dockerfile
  • Add runAsUser: 999 to the webhook deployment pod securityContext

Test plan

  • Verify webapp image builds successfully in CI
  • Deploy to cluster and confirm webhook pods start without CreateContainerConfigError

🤖 Generated with Claude Code

Kubernetes cannot verify a named user is non-root. Pin appuser/appgroup
to UID/GID 999 and use numeric USER directive in both webapp and
keip-integration Dockerfiles. Configure Jib to run as UID 999. Add
runAsUser: 999 to webhook deployment and generated pod securityContexts.

Bump keip-integration 0.5.0 → 0.6.0, webapp 0.19.0 → 0.20.0,
operator 0.16.0 → 0.17.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dcruver dcruver force-pushed the fix/webapp-numeric-uid branch from e4ec760 to b66b99e Compare February 20, 2026 17:14
Add fsGroup: 999 to pod security context so PVC-mounted volumes are
writable by the non-root container user. Increase startup probe
failureThreshold from 12 to 24 (240s) to accommodate Spring Boot 4's
longer startup times.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dcruver dcruver merged commit 41fcca3 into main Feb 20, 2026
11 checks passed
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.

1 participant