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

preguntada hace un año91 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas