Skip to content

Commit

Permalink
RHOAIENG-72: Specify numeric UID in Dockerfiles
Browse files Browse the repository at this point in the history
This resolves the

```
Error: container has runAsNonRoot and image has non-numeric user (rhods), cannot verify user is non-root
```

issue.

OpenShift (by default)
runs images under a random user id and the root user group.

See https://access.redhat.com/documentation/cn/openshift_container_platform/4.15/html/images/creating-images#use-uid_create-images

(cherry picked from commit f51ed22)
  • Loading branch information
jiridanek committed Oct 29, 2024
1 parent c2f7254 commit bfabdda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/notebook-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ COPY --from=builder \
/manager

## Switch to a non-root user
USER rhods
USER 1001:0

ENTRYPOINT [ "/manager" ]
2 changes: 1 addition & 1 deletion components/odh-notebook-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ COPY --from=builder \
/manager

## Switch to a non-root user
USER rhods
USER 1001:0

ENTRYPOINT [ "/manager" ]

0 comments on commit bfabdda

Please sign in to comment.