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

Docker Compose with Amazon ECR Not Working on Remote Server

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • docker-workflow-plugin
    • None
    • Jenkins Version: 2.107.3
      Amazon ECR Plugin Version: 1.6

      Greetings, I am not sure if this is an issue with the Amazon ECR plugin or the docker workflow system, or something that is just not supported.  I have a working Amazon ECR / Docker setup going and I am able to publish to ECR from Jenkins like so: 

      node {
        stage ('Checkout') {
          checkout scm
        }
      
        stage('Build') {
          docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
            withDockerContainer("XXXXX.dkr.ecr.us-west-2.amazonaws.com/node-builder") {
              // some build steps
            }
          }
        }
      
        stage('Docker Build') {
          sh '''
          docker build --file docker/Dockerfile --tag mycontainer .
          docker tag mycontainer XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer
          '''
        }
      
        stage('Docker Push') {
            docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
              sh '''
              docker push XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer:latest
              '''
            }
          }
      }
      
      

      The above works as expected. However in another job, I am trying to run docker compose to "up" the container like this:

      node {
        stage ('Checkout') {
          checkout scm
        }
      
        stage('Compose Up') {
          docker.withServer('tcp://somehost:2376', 'JenkinsDockerClientCert') {
            docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
              sh '''
              docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
              '''
            }
          }
        }
      }
      

      This time I get the following output: 

      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Compose Up)
      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] withDockerRegistry
      $ docker login -u AWS -p ******** https://XXXXX.dkr.ecr.us-west-2.amazonaws.com
      WARNING! Using --password via the CLI is insecure. Use --password-stdin.
      WARNING! Your password will be stored unencrypted in /var/jenkins/workspace/dev-tasks/Docker Compose Up@tmp/ddaeea78-470c-411a-a7d3-412fc18cdf0a/config.json.
      Configure a credential helper to remove this warning. See
      https://docs.docker.com/engine/reference/commandline/login/#credentials-store
      
      Login Succeeded
      [Pipeline] {
      [Pipeline] withDockerServer
      [Pipeline] {
      [Pipeline] sh
      [Docker Compose Up] Running shell script
      + docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
      Pulling mycontainer (XXXXX.dkr.ecr.us-east-2.amazonaws.com/mycontainer)...
      Get https://XXXXX.dkr.ecr.us-east-2.amazonaws.com/v2/mycontainer/manifests/latest: no basic auth credentials
      [Pipeline] }
      [Pipeline] // withDockerServer
      [Pipeline] }
      [Pipeline] // withDockerRegistry
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      

      Docker Compose is obviously installed on the build agent, but we are pointing to a remote docker host. So we know docker compose is running on the build agent and that is probably where the ECR credentials are getting written.. hover the remote host does not seem to get the benefit of the "withRegistry" call. Perhaps I am doing something wrong.  Is this even a supported use case? If not are there any workarounds?

      Thanks.

       

          [JENKINS-51615] Docker Compose with Amazon ECR Not Working on Remote Server

          Michael MacFadden created issue -
          Michael MacFadden made changes -
          Description Original: Greetings, I am not sure if this is an issue with the Amazon ECR plugin or the docker workflow system, or something that is just not supported.  I have a working Amazon ECR / Docker setup going and I am able to publish to ECR from Jenkins like so:

           
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Build') {
              docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                withDockerContainer("XXXXX.dkr.ecr.us-west-2.amazonaws.com/node-builder") {
                  // some build steps
                }
              }
            }

            stage('Docker Build') {
              sh '''
              docker build --file docker/Dockerfile --tag mycontainer .
              docker tag mycontainer XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer
              '''
            }

            stage('Docker Push') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker push XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer:latest
                  '''
                }
              }
          }

          {code}
          However in another job, I am trying to run docker compose to "up" the container like this:

           
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Compose Up') {
              docker.withServer('tcp://somehost:2376', 'JenkinsDockerClientCert') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
                  '''
                }
              }
            }
          }
          {code}
          This time I get the following output:

           

           
          {code:java}
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] stage
          [Pipeline] { (Compose Up)
          [Pipeline] withEnv
          [Pipeline] {
          [Pipeline] withDockerRegistry
          $ docker login -u AWS -p ******** https://XXXXX.dkr.ecr.us-west-2.amazonaws.com
          WARNING! Using --password via the CLI is insecure. Use --password-stdin.
          WARNING! Your password will be stored unencrypted in /var/jenkins/workspace/dev-tasks/Docker Compose Up@tmp/ddaeea78-470c-411a-a7d3-412fc18cdf0a/config.json.
          Configure a credential helper to remove this warning. See
          https://docs.docker.com/engine/reference/commandline/login/#credentials-store

          Login Succeeded
          [Pipeline] {
          [Pipeline] withDockerServer
          [Pipeline] {
          [Pipeline] sh
          [Docker Compose Up] Running shell script
          + docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
          Pulling mycontainer (XXXXX.dkr.ecr.us-east-2.amazonaws.com/mycontainer)...
          Get https://XXXXX.dkr.ecr.us-east-2.amazonaws.com/v2/mycontainer/manifests/latest: no basic auth credentials
          [Pipeline] }
          [Pipeline] // withDockerServer
          [Pipeline] }
          [Pipeline] // withDockerRegistry
          [Pipeline] }
          [Pipeline] // withEnv
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          {code}
          Docker Compose is obviously installed no the build agent, but we are pointing to a remote docker host. I am not sure which host is having issues with the credentials.  Is this a supported configuration?

           

          *Jenkins Version*: 2.107.3
          *Amazon ECR Plugin Version*: 1.6

           

          Thanks.

           
          New: Greetings, I am not sure if this is an issue with the Amazon ECR plugin or the docker workflow system, or something that is just not supported.  I have a working Amazon ECR / Docker setup going and I am able to publish to ECR from Jenkins like so: 
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Build') {
              docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                withDockerContainer("XXXXX.dkr.ecr.us-west-2.amazonaws.com/node-builder") {
                  // some build steps
                }
              }
            }

            stage('Docker Build') {
              sh '''
              docker build --file docker/Dockerfile --tag mycontainer .
              docker tag mycontainer XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer
              '''
            }

            stage('Docker Push') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker push XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer:latest
                  '''
                }
              }
          }

          {code}
          However in another job, I am trying to run docker compose to "up" the container like this:

           
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Compose Up') {
              docker.withServer('tcp://somehost:2376', 'JenkinsDockerClientCert') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
                  '''
                }
              }
            }
          }
          {code}
          This time I get the following output: 
          {code:java}
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] stage
          [Pipeline] { (Compose Up)
          [Pipeline] withEnv
          [Pipeline] {
          [Pipeline] withDockerRegistry
          $ docker login -u AWS -p ******** https://XXXXX.dkr.ecr.us-west-2.amazonaws.com
          WARNING! Using --password via the CLI is insecure. Use --password-stdin.
          WARNING! Your password will be stored unencrypted in /var/jenkins/workspace/dev-tasks/Docker Compose Up@tmp/ddaeea78-470c-411a-a7d3-412fc18cdf0a/config.json.
          Configure a credential helper to remove this warning. See
          https://docs.docker.com/engine/reference/commandline/login/#credentials-store

          Login Succeeded
          [Pipeline] {
          [Pipeline] withDockerServer
          [Pipeline] {
          [Pipeline] sh
          [Docker Compose Up] Running shell script
          + docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
          Pulling mycontainer (XXXXX.dkr.ecr.us-east-2.amazonaws.com/mycontainer)...
          Get https://XXXXX.dkr.ecr.us-east-2.amazonaws.com/v2/mycontainer/manifests/latest: no basic auth credentials
          [Pipeline] }
          [Pipeline] // withDockerServer
          [Pipeline] }
          [Pipeline] // withDockerRegistry
          [Pipeline] }
          [Pipeline] // withEnv
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          {code}
          Docker Compose is obviously installed no the build agent, but we are pointing to a remote docker host. I am not sure which host is having issues with the credentials.  Is this a supported configuration?

          Thanks.

           
          Environment New: Jenkins Version: 2.107.3
          Amazon ECR Plugin Version: 1.6
          Michael MacFadden made changes -
          Description Original: Greetings, I am not sure if this is an issue with the Amazon ECR plugin or the docker workflow system, or something that is just not supported.  I have a working Amazon ECR / Docker setup going and I am able to publish to ECR from Jenkins like so: 
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Build') {
              docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                withDockerContainer("XXXXX.dkr.ecr.us-west-2.amazonaws.com/node-builder") {
                  // some build steps
                }
              }
            }

            stage('Docker Build') {
              sh '''
              docker build --file docker/Dockerfile --tag mycontainer .
              docker tag mycontainer XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer
              '''
            }

            stage('Docker Push') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker push XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer:latest
                  '''
                }
              }
          }

          {code}
          However in another job, I am trying to run docker compose to "up" the container like this:

           
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Compose Up') {
              docker.withServer('tcp://somehost:2376', 'JenkinsDockerClientCert') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
                  '''
                }
              }
            }
          }
          {code}
          This time I get the following output: 
          {code:java}
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] stage
          [Pipeline] { (Compose Up)
          [Pipeline] withEnv
          [Pipeline] {
          [Pipeline] withDockerRegistry
          $ docker login -u AWS -p ******** https://XXXXX.dkr.ecr.us-west-2.amazonaws.com
          WARNING! Using --password via the CLI is insecure. Use --password-stdin.
          WARNING! Your password will be stored unencrypted in /var/jenkins/workspace/dev-tasks/Docker Compose Up@tmp/ddaeea78-470c-411a-a7d3-412fc18cdf0a/config.json.
          Configure a credential helper to remove this warning. See
          https://docs.docker.com/engine/reference/commandline/login/#credentials-store

          Login Succeeded
          [Pipeline] {
          [Pipeline] withDockerServer
          [Pipeline] {
          [Pipeline] sh
          [Docker Compose Up] Running shell script
          + docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
          Pulling mycontainer (XXXXX.dkr.ecr.us-east-2.amazonaws.com/mycontainer)...
          Get https://XXXXX.dkr.ecr.us-east-2.amazonaws.com/v2/mycontainer/manifests/latest: no basic auth credentials
          [Pipeline] }
          [Pipeline] // withDockerServer
          [Pipeline] }
          [Pipeline] // withDockerRegistry
          [Pipeline] }
          [Pipeline] // withEnv
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          {code}
          Docker Compose is obviously installed no the build agent, but we are pointing to a remote docker host. I am not sure which host is having issues with the credentials.  Is this a supported configuration?

          Thanks.

           
          New: Greetings, I am not sure if this is an issue with the Amazon ECR plugin or the docker workflow system, or something that is just not supported.  I have a working Amazon ECR / Docker setup going and I am able to publish to ECR from Jenkins like so: 
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Build') {
              docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                withDockerContainer("XXXXX.dkr.ecr.us-west-2.amazonaws.com/node-builder") {
                  // some build steps
                }
              }
            }

            stage('Docker Build') {
              sh '''
              docker build --file docker/Dockerfile --tag mycontainer .
              docker tag mycontainer XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer
              '''
            }

            stage('Docker Push') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker push XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer:latest
                  '''
                }
              }
          }

          {code}
          The above works as expected. However in another job, I am trying to run docker compose to "up" the container like this:
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Compose Up') {
              docker.withServer('tcp://somehost:2376', 'JenkinsDockerClientCert') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
                  '''
                }
              }
            }
          }
          {code}
          This time I get the following output: 
          {code:java}
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] stage
          [Pipeline] { (Compose Up)
          [Pipeline] withEnv
          [Pipeline] {
          [Pipeline] withDockerRegistry
          $ docker login -u AWS -p ******** https://XXXXX.dkr.ecr.us-west-2.amazonaws.com
          WARNING! Using --password via the CLI is insecure. Use --password-stdin.
          WARNING! Your password will be stored unencrypted in /var/jenkins/workspace/dev-tasks/Docker Compose Up@tmp/ddaeea78-470c-411a-a7d3-412fc18cdf0a/config.json.
          Configure a credential helper to remove this warning. See
          https://docs.docker.com/engine/reference/commandline/login/#credentials-store

          Login Succeeded
          [Pipeline] {
          [Pipeline] withDockerServer
          [Pipeline] {
          [Pipeline] sh
          [Docker Compose Up] Running shell script
          + docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
          Pulling mycontainer (XXXXX.dkr.ecr.us-east-2.amazonaws.com/mycontainer)...
          Get https://XXXXX.dkr.ecr.us-east-2.amazonaws.com/v2/mycontainer/manifests/latest: no basic auth credentials
          [Pipeline] }
          [Pipeline] // withDockerServer
          [Pipeline] }
          [Pipeline] // withDockerRegistry
          [Pipeline] }
          [Pipeline] // withEnv
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          {code}
          Docker Compose is obviously installed on the build agent, but we are pointing to a remote docker host. So we know docker compose is running on the build agent and that is probably where the ecr-credentials are getting written.. hover the remote host does not seem to get the benefit of the "withRegistry" call. Perhaps I am doing something wrong.  Is this even a supported use case? If not are there any workarounds?

          Thanks.

           
          Michael MacFadden made changes -
          Description Original: Greetings, I am not sure if this is an issue with the Amazon ECR plugin or the docker workflow system, or something that is just not supported.  I have a working Amazon ECR / Docker setup going and I am able to publish to ECR from Jenkins like so: 
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Build') {
              docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                withDockerContainer("XXXXX.dkr.ecr.us-west-2.amazonaws.com/node-builder") {
                  // some build steps
                }
              }
            }

            stage('Docker Build') {
              sh '''
              docker build --file docker/Dockerfile --tag mycontainer .
              docker tag mycontainer XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer
              '''
            }

            stage('Docker Push') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker push XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer:latest
                  '''
                }
              }
          }

          {code}
          The above works as expected. However in another job, I am trying to run docker compose to "up" the container like this:
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Compose Up') {
              docker.withServer('tcp://somehost:2376', 'JenkinsDockerClientCert') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
                  '''
                }
              }
            }
          }
          {code}
          This time I get the following output: 
          {code:java}
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] stage
          [Pipeline] { (Compose Up)
          [Pipeline] withEnv
          [Pipeline] {
          [Pipeline] withDockerRegistry
          $ docker login -u AWS -p ******** https://XXXXX.dkr.ecr.us-west-2.amazonaws.com
          WARNING! Using --password via the CLI is insecure. Use --password-stdin.
          WARNING! Your password will be stored unencrypted in /var/jenkins/workspace/dev-tasks/Docker Compose Up@tmp/ddaeea78-470c-411a-a7d3-412fc18cdf0a/config.json.
          Configure a credential helper to remove this warning. See
          https://docs.docker.com/engine/reference/commandline/login/#credentials-store

          Login Succeeded
          [Pipeline] {
          [Pipeline] withDockerServer
          [Pipeline] {
          [Pipeline] sh
          [Docker Compose Up] Running shell script
          + docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
          Pulling mycontainer (XXXXX.dkr.ecr.us-east-2.amazonaws.com/mycontainer)...
          Get https://XXXXX.dkr.ecr.us-east-2.amazonaws.com/v2/mycontainer/manifests/latest: no basic auth credentials
          [Pipeline] }
          [Pipeline] // withDockerServer
          [Pipeline] }
          [Pipeline] // withDockerRegistry
          [Pipeline] }
          [Pipeline] // withEnv
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          {code}
          Docker Compose is obviously installed on the build agent, but we are pointing to a remote docker host. So we know docker compose is running on the build agent and that is probably where the ecr-credentials are getting written.. hover the remote host does not seem to get the benefit of the "withRegistry" call. Perhaps I am doing something wrong.  Is this even a supported use case? If not are there any workarounds?

          Thanks.

           
          New: Greetings, I am not sure if this is an issue with the Amazon ECR plugin or the docker workflow system, or something that is just not supported.  I have a working Amazon ECR / Docker setup going and I am able to publish to ECR from Jenkins like so: 
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Build') {
              docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                withDockerContainer("XXXXX.dkr.ecr.us-west-2.amazonaws.com/node-builder") {
                  // some build steps
                }
              }
            }

            stage('Docker Build') {
              sh '''
              docker build --file docker/Dockerfile --tag mycontainer .
              docker tag mycontainer XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer
              '''
            }

            stage('Docker Push') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker push XXXXX.dkr.ecr.us-west-2.amazonaws.com/mycontainer:latest
                  '''
                }
              }
          }

          {code}
          The above works as expected. However in another job, I am trying to run docker compose to "up" the container like this:
          {code:java}
          node {
            stage ('Checkout') {
              checkout scm
            }

            stage('Compose Up') {
              docker.withServer('tcp://somehost:2376', 'JenkinsDockerClientCert') {
                docker.withRegistry('https://XXXXX.dkr.ecr.us-west-2.amazonaws.com', 'ecr:us-west-2:JenkinsAWS') {
                  sh '''
                  docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
                  '''
                }
              }
            }
          }
          {code}
          This time I get the following output: 
          {code:java}
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] stage
          [Pipeline] { (Compose Up)
          [Pipeline] withEnv
          [Pipeline] {
          [Pipeline] withDockerRegistry
          $ docker login -u AWS -p ******** https://XXXXX.dkr.ecr.us-west-2.amazonaws.com
          WARNING! Using --password via the CLI is insecure. Use --password-stdin.
          WARNING! Your password will be stored unencrypted in /var/jenkins/workspace/dev-tasks/Docker Compose Up@tmp/ddaeea78-470c-411a-a7d3-412fc18cdf0a/config.json.
          Configure a credential helper to remove this warning. See
          https://docs.docker.com/engine/reference/commandline/login/#credentials-store

          Login Succeeded
          [Pipeline] {
          [Pipeline] withDockerServer
          [Pipeline] {
          [Pipeline] sh
          [Docker Compose Up] Running shell script
          + docker-compose -f docker-compose/docker-compose.yml -p myapp up -d
          Pulling mycontainer (XXXXX.dkr.ecr.us-east-2.amazonaws.com/mycontainer)...
          Get https://XXXXX.dkr.ecr.us-east-2.amazonaws.com/v2/mycontainer/manifests/latest: no basic auth credentials
          [Pipeline] }
          [Pipeline] // withDockerServer
          [Pipeline] }
          [Pipeline] // withDockerRegistry
          [Pipeline] }
          [Pipeline] // withEnv
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          {code}
          Docker Compose is obviously installed on the build agent, but we are pointing to a remote docker host. So we know docker compose is running on the build agent and that is probably where the ECR credentials are getting written.. hover the remote host does not seem to get the benefit of the "withRegistry" call. Perhaps I am doing something wrong.  Is this even a supported use case? If not are there any workarounds?

          Thanks.

           
          Ivan Fernandez Calvo made changes -
          Link New: This issue is related to JENKINS-44143 [ JENKINS-44143 ]
          Ivan Fernandez Calvo made changes -
          Component/s Original: amazon-ecr-plugin [ 21454 ]
          Ivan Fernandez Calvo made changes -
          Link New: This issue is related to JENKINS-51949 [ JENKINS-51949 ]
          Ivan Fernandez Calvo made changes -
          Assignee Original: Ivan Fernandez Calvo [ ifernandezcalvo ]

            Unassigned Unassigned
            mmacfadden Michael MacFadden
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: