Create a user in the Dockerfile with a known user ids (UID) and group ids (GID), and run the container by using the same user. When adding UID or GID to Dockerfile, ensure that the UID or GID is not reserved and used in the base image.
Note: While granting
anyuid SCC, ensure that the
USER is defined in the Dockerfile. Otherwise, Openshift allows images to run as root user.