-
-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I have a Dockerfile that looks like this:
# syntax=docker/dockerfile:1
FROM xxxxxxxxxxxx.dkr.ecr.ap-southeast-2.amazonaws.com/my-private-image:my-tag
# ... other stuff; the build doesn't even get this farThe build falls over pretty much immediately:
env AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$AWS_ACCESS_KEY_ID" build 2>&1
INFO[0000] building image
#1 [internal] load build definition from Dockerfile
#1 sha256:8d67fdf14badea11ba1493900a480c02350ddc9e98fe087c42549f52cbd25745
#1 transferring dockerfile: 32B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 sha256:8a25834ab0b08df91cd3f5488c9996ba5141bb998e06c3a3958c9031a4af1a12
#2 transferring context: 34B done
#2 DONE 0.0s
#3 resolve image config for docker.io/docker/dockerfile:1
#3 sha256:ac072d521901222eeef550f52282877f196e16b0247844be9ceb1ccc1eac391d
#3 DONE 1.6s
#4 docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50032edf31be0021
#4 sha256:94d31f7191390ebf1aa76bc23bdbd269fd7a0432f853889e4918b44513a34946
#4 resolve docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50032edf31be0021 done
#4 CACHED
#5 [internal] load build definition from Dockerfile
#5 sha256:abd879327137e3a3e7e0b87463aeff911bfbc148f94954012ad18b309a531ed7
#5 DONE 0.0s
#6 [internal] load metadata for xxxxxxxxxxxx.dkr.ecr.ap-southeast-2.amazonaws.com/my-private-image:latest
#6 sha256:3ae0be8977208b9d964dcb043c5e9a3a79046fb7a6b4aeed293d2f8f263305e6
#6 ERROR: unexpected status code [manifests latest]: 401 Unauthorized
------
> [internal] load metadata for xxxxxxxxxxxx.dkr.ecr.ap-southeast-2.amazonaws.com/my-private-image:latest:
------
Dockerfile:4
--------------------
3 |
4 | >>> FROM xxxxxxxxxxxx.dkr.ecr.ap-southeast-2.amazonaws.com/my-private-image:my-tag
5 | RUN \
6 | export DEBIAN_FRONTEND=noninteractive \
--------------------
error: failed to solve: rpc error: code = Unknown desc = 156399527556.dkr.ecr.ap-southeast-2.amazonaws.com/aws-athena/python-3.9-slim-buster:latest: unexpected status code [manifests latest]: 401 Unauthorized
FATA[0002] failed to build: build: exit status 1
FATA[0002] failed to run task: exit status 1
As you can see, I already ensure the credentials are passed to build so I dunno why I still get 401.
Reproduction steps
Run build with the above Dockerfile.
Expected behavior
It should not fail on FROM statement.
Additional context
No response
filipefreitas82, Dakad, kitkars and kanngiesser
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working