Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-18434

Artifactory docker with custom user id permissions issues for extra configurations and nginx

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.6.7
    • Fix Version/s: 6.8.0
    • Component/s: None
    • Labels:
      None

      Description

      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):

      1. Create cache directory on host ${PATH_ON_HOST_TO}/nginx-cache
      2. Create pid file on host ${PATH_ON_HOST_TO}/nginx.pid:/var/run/nginx.pid
      3. Give write permissions to user UID_NUMBER to the cache directory and pid file on host
      4. 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

       

        Attachments

          Activity

            People

            • Assignee:
              eldada Eldad Assis
              Reporter:
              Nimerb Nimer Bsoul
              Assigned QA:
              Konstantin Shenderov
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: