Skip to content

Commit a7292e1

Browse files
authored
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.
1 parent 4fa791c commit a7292e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile.rootless

Lines changed: 1 addition & 1 deletion
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
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)