-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
Jenkins version: 2.40
Jenkinsfile contains the following section:
node ('Docker') { stage('Checkout') { checkout scm } withDockerRegistry([credentialsId: 'XXXXX', url: 'http://registry.domain.com:5000']) { stage('Build Docker Image') { def DockerApp = docker.build "registry.domain.com:5000/user/imagename" DockerApp.push 'JenkinsTest' } } }
But the image is named incorrectly when tagged during the DockerApp.Push.
Pipeline Output:
[snip] Successfully built 0f9f005fdb18 [Pipeline] dockerFingerprintFrom [Pipeline] sh [Github_statsite_Jenkinstest-EGEMJERB5XG2N2GF64UBC26O6ZDZ5DONMPY6CGFCYDTZ33PBX4GA] Running shell script + docker tag --force=true registry.domain.com:5000/user/imagename registry.domain.com:JenkinsTest unknown flag: --force See 'docker tag --help'. + docker tag registry.domain.com:5000/user/imagename registry.domain.com:JenkinsTest [snip]
It seems to be truncated at the : for the port number, and then tries uploading the image as docker.io/library/registry.domain.com
- duplicates
-
JENKINS-39181 Invalid fully qualified image name when registry URL specified.
- Resolved