2

I'm trying to follow the docker ecs integration instructions.

I've copied their required IAM permissions to make sure my user has access. I've successfully created a context with:

docker context create ecs akff-web

passing it the correct AWS profile and set it to use:

docker context use akff-web

The results of docker context ls look similar to those in the documentation––namely akff-web * ecs with all the other fields blank for my new context.

When I'm in my default context, docker compose up works fine. I'm using the public image php:apache for my base image, so I'm not in the same boat as others who are actually using private images.

But docker compose up still gives me an authorization error:

    $ docker compose up
INFO trying next host                              error="pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed" host=registry-1.docker.io
pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

I'm new to docker and aws so I'd really appreciate any pointers in how to troubleshoot this issue.

Adair
  • 1,697
  • 18
  • 22

1 Answers1

3

Finally got the answer through one of the suggested similar questions.

docker compose up apparently only works with images that are already deployed somewhere, not local images. So it's just assuming my image is on dockerhub––not the base image, the image itself, in the "image" tag of the Dockerfile.

I uploaded to ECR and changed the image in the tag to the ECR name (<my account>.dkr.ecr.<my region>.amazonaws.com/akff-web), and it worked. (Before the image tag just had akff-web, so based on this Q&A I'm not sure why it didn't assume it was local.)

Adair
  • 1,697
  • 18
  • 22