#Build dockerfiles with FROM <private_ECR_repository>

1 messages · Page 1 of 1 (latest)

silver bane
#

Dockerfile: FROM <private_ecr_repository>, using Directory().DockerBuild().WithRegistryAuth(<working_auth>) results in 401 unauthorized. That same auth is used in those tests to successfully push to that same private ECR repository.

Do I need to authenticate another way?

shut pebble
silver bane
#

🤦‍♂️ I didn't even see that option on *dagger.Directory, thanks

#

Edited the original message, this is a case of Directory.Dockerbuild

shut pebble
#

That will Authenticate your whole Dagger session towards that registry. I think that will work

silver bane
#

Well that would be nice, I could shift it to the Aws method. I'll try that now

silver bane
#

Forgot to come back to this, that's worked. I didn't know a call to .WithRegistryAuth authed that whole session, thought it was just that container