ECR Docker errors in Jenkins pipelines

0

We are seeing random ECR docker errors in our Jenkins pipelines.

There are two types of errors noticed 1) ERROR: Timeout after 180 seconds 2) failed to export image: failed to set parent sha256:abcd: unknown parent image ID sha256:abcd.

As per few suggestions, I tried to introduce a retry mechanism for error 1. And there are several suggestions for the second issue, increasing disc space, performing docker prune, changing docker version etc.,

Please help in understanding the root causes of the issues and suggest how this can be fixed temporarily on the pipelines.

pipeline{
    agent any
    stages{
        stage('POC') {
            steps{
                script{
                    withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: 'credId']]) {
	                    docker.withRegistry("https://xxxx.dkr.ecr.us-east-1.amazonaws.com") {
	                        sh("`aws ecr get-login --no-include-email --region us-east-1`")
	                        docker.image('xxxx.dkr.ecr.us-east-1.amazonaws.com/my-image:my-version').inside{
	                          script{
	                            sh("echo6 'POC'")
	                          }
	                        }
	                    }
	                }
                }
            }
        }
    }
}

This is a follow up to https://repost.aws/questions/QUIexgvHvYQvyD6i2ExcY-6Q/ecr-login-token-expiry-reauthentication-suggestions

질문됨 일 년 전91회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠