docker icon indicating copy to clipboard operation
docker copied to clipboard

Allow running tomcat as non-root

Open jeanpommier opened this issue 1 year ago • 3 comments

It is a good practice to allow running a container as unprivileged user.

To preserve backward compatibility and provide flexibility, this feature is added at the entrypoint level and is set using environment variables.

  • RUN_UNPRIVILEGED=true activates the unprivileged mode with default uid:gid as 999:999
  • RUN_WITH_USER_UID allows to set the uid used for tomcat user
  • RUN_WITH_USER_UID allows to set the gid used for tomcat group
  • CHANGE_OWNERSHIP_ON_FOLDERS accepts a space-separated list of folder on which a chmod will be run, changing (recursively) the ownership for the tomcat user.

jeanpommier avatar Sep 24 '24 16:09 jeanpommier