-
Type:
Bug
-
Status: Done
-
Resolution: Fixed
-
Affects Version/s: 6.6.7
-
Fix Version/s: 6.8.0
-
Component/s: None
-
Labels:None
-
Severity:Medium
-
Requirement Status:
When running Artifactory docker with a custom UID and GID (example '–user 10121:10121) we see two issues
1. Artifactory Docker image
Passing of the EXTRA_JAVA_OPTIONS environment variable, you will get permission denied error:
"cp: cannot create regular file '/opt/jfrog/artifactory/bin/artifactory.default.origin': Permission denied"
environment:
- EXTRA_JAVA_OPTIONS=-Xmx4g
2. Nginx Docker image
Nginx fails to start with custom user. The workaround is as follows (Does not include a workaround for the environment variable issue):
- Create cache directory on host ${PATH_ON_HOST_TO}/nginx-cache
- Create pid file on host ${PATH_ON_HOST_TO}/nginx.pid:/var/run/nginx.pid
- Give write permissions to user UID_NUMBER to the cache directory and pid file on host
- Edit compose yaml and add two mounts for the nginx container:
- ${PATH_ON_HOST_TO}/nginx-cache:/var/cache/nginx
- ${PATH_ON_HOST_TO}/nginx.pid:/var/run/nginx.pid
To reproduce, add the following parameters to the docker run or compose yaml
Docker run: "–user 10121:10121"
Docker compose:
user: 10121:10121