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

Add entrypoint in Docker image to allow username and group names to be different

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.7.2
    • Fix Version/s: None
    • Component/s: Docker Image, Installer
    • Labels:
      None

      Description

      The docker file/entrypoint used logic such as below.

      setAccessCreds() {

      ACCESS_SOURCE_IP_ALLOWED=${ACCESS_SOURCE_IP_ALLOWED:-127.0.0.1}

      ACCESS_CREDS_FILE=${ACCESS_ETC_FOLDER}/bootstrap.creds

      if [ ! -z "${ACCESS_USER}" ] && [ ! -z "${ACCESS_PASSWORD}" ] && [ ! -f ${ACCESS_CREDS_FILE} ] ; then

      logger "Creating bootstrap.creds using ACCESS_USER and ACCESS_PASSWORD env variables"

      mkdir -p ${ACCESS_ETC_FOLDER} || errorExit "Couldn't create ${ACCESS_ETC_FOLDER}"

      echo "${ACCESS_USER}@${ACCESS_SOURCE_IP_ALLOWED}=${ACCESS_PASSWORD}" > ${ACCESS_CREDS_FILE}

      chmod 600 ${ACCESS_CREDS_FILE} || errorExit "Setting permission on ${ACCESS_CREDS_FILE} failed"

      chown ${ARTIFACTORY_USER_NAME}:${ARTIFACTORY_USER_NAME} ${ACCESS_CREDS_FILE} || errorExit "Setting ownership on ${ACCESS_CREDS_FILE} failed"

      fi

      }

      In that the directories are set with a group that has to be the same as the username.

      Feature request is to be able to modify the entrypoint and provide another variable so that the username is not used for both the user and the group when setting permissions.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aaronr Aaron Rhodes
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: