GoogleContainerTools / kaniko

Build Container Images In Kubernetes
Apache License 2.0
14.85k stars 1.44k forks source link

ECR authentication fails in gcr.io/kaniko-project/executor:debug since version 1.19.1 #2907

Closed ChristopherKlinge closed 11 months ago

ChristopherKlinge commented 11 months ago

Actual behavior As of release 1.19.1 kaniko is no longer able to connect to ECR.

Expected behavior Authentication for ECR should work as it did in earlier releases.

To Reproduce Steps to reproduce the behavior:

  1. Use the image gcr.io/kaniko-project/executor:v1.19.1-debug
  2. Use the following code to execute kaniko in the pipeline:
    cd dockerimages/src/main/docker/$CONTAINER_NAME
    mkdir -p /kaniko/.docker
    echo "{\"credHelpers\":{\"$DOCKER_REGISTRY\":\"ecr-login\"}}" > /kaniko/.docker/config.json
    /kaniko/executor $KANIKO_MIRROR_ARGS \
    --context $CONTEXT \
    --destination "$DOCKER_REGISTRY/${IMAGE_NAME}/${STAGE_NAME}/$CONTAINER_NAME:$CI_COMMIT_SHORT_SHA" \
    --destination "$DOCKER_REGISTRY/${IMAGE_NAME}/${STAGE_NAME}/$CONTAINER_NAME:$SemVer-$CI_COMMIT_SHORT_SHA" \
    --build-arg REGISTRY="$DOCKER_REGISTRY/${IMAGE_NAME}/${STAGE_NAME}/" \
    --build-arg HASH="$CI_COMMIT_SHORT_SHA" \
    $KANIKO_USER_OPTS

Additional Information

aaron-prindle commented 11 months ago

Thanks for flagging this, kaniko has rolled back latest, debug and slim tags to v1.18.0. Closing this issue as dupe, there is another tracking bug here - https://github.com/GoogleContainerTools/kaniko/issues/2882