Docker push local repository

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Docker push local repository

Walter Heestermans

I'm new in Jenkins and executing a simple pipeline to get source from github, build image, test image and then push to local DTR

node {
    def app
    stage('Clone repository') {
        checkout scm
    stage('Build image') {
        app ="test/hellonode")
    stage('Test image') {
        app.inside {
            sh 'node --version'
    stage('Push image') {
        docker.withRegistry('http://<local-dtr>', credentials-dtr') {

credentials-dtr are dfined inside the Jenkins --> Credentials --> System --> Global credentials (unrestricted)

The repository is created and I c
All works fine except the push

Pipeline] // withDockerContainer [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Push image) [Pipeline] withEnv [Pipeline] { [Pipeline] withDockerRegistry Wrote authentication to /var/jenkins_home/.dockercfg
[Pipeline] { [Pipeline] sh [docker-hellonode] Running shell script
+ docker tag --force=true toyota/hellonode <local-dtr>/xyz/hellonode:latest
unknown flag: --force
See 'docker tag --help'.
+ docker tag xyz/hellonode
[Pipeline] sh [docker-hellonode] Running shell script
+ docker push <dtr-url>/xyz/hellonode:latest
The push refers to a repository []
81c1e1c37cf0: Preparing
8455c73a933d: Preparing
41d2e9b986ab: Preparing
cdd2b48b0e16: Preparing
072b714c90b8: Preparing
ea2e97e9408f: Preparing
0da372da714b: Preparing
bf3841becf9d: Preparing
63866df00998: Preparing
2f9128310b77: Preparing
d9a5f9b8d5c2: Preparing
c01c63c6823d: Preparing
0da372da714b: Waiting
bf3841becf9d: Waiting
63866df00998: Waiting
2f9128310b77: Waiting
d9a5f9b8d5c2: Waiting
c01c63c6823d: Waiting
ea2e97e9408f: Waiting
denied: requested access to the resource is denied
[Pipeline] } [Pipeline] // withDockerRegistry [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline

You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit
For more options, visit