Skip to content

Commit cf0e7a1

Browse files
ibotty6543
authored andcommitted
specify user in rootless container numerically (go-gitea#16361)
* specify user in rootless container numerically With kubernetes' PodSecurityPolicy set to runAsNonRoot it will not allow starting the container. The error message is ``` Error: container has runAsNonRoot and image has non-numeric user (git), cannot verify user is non-root ``` The `USER` directive has to be numerical for that to work. * mention the name of the uid/gid Co-authored-by: 6543 <6543@obermui.de>
1 parent 13f6dbc commit cf0e7a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile.rootless

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ COPY docker/rootless /
5656
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /usr/local/bin/gitea
5757
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
5858

59-
USER git:git
59+
USER 1000:1000 # git:git
6060
ENV GITEA_WORK_DIR /var/lib/gitea
6161
ENV GITEA_CUSTOM /var/lib/gitea/custom
6262
ENV GITEA_TEMP /tmp/gitea

0 commit comments

Comments
 (0)