docker-nexus3
docker-nexus3 copied to clipboard
Use numeric uid instead of username in Dockerfiles
Systems configured to disallow running images as root aren't able to run images that use a username string value for the USER because they can't validate that a username isn't mapped to uid 0 (root). To allow images to run on such systems, use the uid of the user as the value for USER instead of the username.
This has no downside when running in environments that do not do non-root validation.
See MustRunAsNonRoot at https://kubernetes.io/docs/reference/access-authn-authz/psp-to-pod-security-standards/ and https://github.com/kubernetes/kubernetes/pull/56503