6

I want to use phpmyadmin public image from docker hub and configure ECS fargate task .But not sure how to simply put docker pull phpmyadmin command in ECS task definition. Is there an option to do it directly from docker hub public repo? or should i build image locally, push to ECR and use that image?

Chris Williams
  • 32,215
  • 4
  • 30
  • 68
uman dev
  • 409
  • 1
  • 5
  • 12

3 Answers3

6

Inside of your task definition you would need to add your container definitions.

For the image value you would need to set the public image name copied from Docker Hub.

There's no need to push to ECR for this as it is already a public image.

Chris Williams
  • 32,215
  • 4
  • 30
  • 68
  • thanks. helps. but i'm stuck in next steps. ecs task/container is not started. probably related to NAT and route table configuration issues. any easy steps in order to follow to create ecs task successfully with a docker image? CannotPullContainerError: Error response from daemon: pull access denied for phpmyadmin, repository does not exist or may require 'docker login' – uman dev Jun 08 '20 at 02:37
  • Hi theres actually a set of debug instructions for this :) You can find them here: https://aws.amazon.com/premiumsupport/knowledge-center/ecs-pull-container-api-error-ecr/ – Chris Williams Jun 08 '20 at 07:12
2

You can simply write:

docker.io/<dockerhub_username>/<dockerhub_repository>:tag

in Image field

For phpmyadmin it should be:

docker.io/phpmyadmin:latest
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Eduard Grinberg
  • 129
  • 2
  • 8
1

got it. not required to push to ECR. simply FROM and image command worked.

uman dev
  • 409
  • 1
  • 5
  • 12