Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50236

Add documentation on how to pass through docker configuration

      I was using secretEnv previously to pass in credentials for my docker repository as environment vars from a K8S secret in a scripted syntax job. This was working before the most recent plugin update and I just used the ENV in a docker login script. Originally I wanted to use the image-pull-secret to just mount a config.json file at /root/.docker/config.json but that also didn't work as I think the plugin doesn't know how to mount a kubernetes.io/dockerconfigjson type. My final attempt was to pass the host volume at /root/.docker into the guest which also didn't work. I imagine others will want to pass the host docker config in since they are already using the docker.sock socket. 

      hostPathVolume(hostPath: '/root/.docker', mountPath: '/root/.docker')

          [JENKINS-50236] Add documentation on how to pass through docker configuration

          Matt L created issue -
          Matt L made changes -
          Description Original: I was using secretEnv previously to pass in credentials for my docker repository as environment vars from a K8S secret in a scripted syntax job. This was working before the most recent plugin update and I just used the ENV in a docker login script. Originally I wanted to use the image-pull-secret to just mount a config.json file at /root/.docker/config.json but that also didn't work as I think the plugin doesn't know how to mount a kubernetes.io/dockerconfigjson type. My final attempt was to pass the host volume at /root/.docker into the guest which also didn't work. I imagine others will want to pass the host docker config in since they are already using the docker.sock socket.  New: I was using secretEnv previously to pass in credentials for my docker repository as environment vars from a K8S secret in a scripted syntax job. This was working before the most recent plugin update and I just used the ENV in a docker login script. Originally I wanted to use the image-pull-secret to just mount a config.json file at /root/.docker/config.json but that also didn't work as I think the plugin doesn't know how to mount a kubernetes.io/dockerconfigjson type. My final attempt was to pass the host volume at /root/.docker into the guest which also didn't work. I imagine others will want to pass the host docker config in since they are already using the docker.sock socket. 
          {code:java}
          hostPathVolume(hostPath: '/root/.docker', mountPath: '/root/.docker'){code}
          Jesse Glick made changes -
          Assignee Original: Carlos Sanchez [ csanchez ]
          Vincent Latombe made changes -
          Labels New: documentation

            Unassigned Unassigned
            obsecurus Matt L
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: