Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xnat/docker-entrypoint.sh to handle tomcat container running as non-root #30

Open
westbywest opened this issue Apr 23, 2020 · 0 comments

Comments

@westbywest
Copy link

As of 2d2a350, xnat/Dockerfile uses variables XNAT_UID / XNAT_GID to launch tomcat with arbitrary non-root user. If ./xnat-data/* folders don't already exist, docker-compose will create them with root ownership (designed docker behavior), making them inaccessible to xnat-web container.

A couple alternatives to simply requiring ./xnat-data/* folders exist ahead of time with appropriate ownership:

  1. Always launch xnat-web container as root, but with xnat/docker-entrypoint.sh script to chown ./xnat-data/* folders and then launch tomcat as XNAT_UID.XNAT_GID. Postgres container does this: https://github.com/docker-library/postgres/blob/master/11/alpine/docker-entrypoint.sh
  2. User alternate tomcat container like https://hub.docker.com/r/unidata/tomcat-docker
@westbywest westbywest changed the title Add xnat/docker-entrypoint.sh to handle tomcat container running as non-root uid Add xnat/docker-entrypoint.sh to handle tomcat container running as non-root Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant