tisha
tisha

Reputation: 39

how to provide docker image in aws?

when setting up a job definition in aws batch, I can specify a container image. can i directly specify my image from the docker hub repo ?

I have created a public docker hub repo, but i'm not sure if aws will pull the image directly from there?

Upvotes: 1

Views: 2211

Answers (2)

Adiii
Adiii

Reputation: 59946

Yes, you can specify an image from Docker Hub, there is no such restriction in ECS and AWS Batch Job.

For Container image, choose the Docker image to use for your job. Images in the Docker Hub registry are available by default. You can also specify other repositories with repository-url/image:tag. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to Image in the Create a container section of the Docker Remote API and the IMAGE parameter of docker run.

If you mentioned image with single name like

nginx:latest

The job will pull image from Docker hub.

Upvotes: 1

Marcin
Marcin

Reputation: 238199

Yes, I don't see why it would not work. Since AWS Batch uses ECS, the following options are allowed for Images in ECS (among other things):

Images in official repositories on Docker Hub use a single name (for example, ubuntu or mongo).

Images in other repositories on Docker Hub are qualified with an organization name (for example, amazon/amazon-ecs-agent).

Upvotes: 0

Related Questions