如何在 aws 中提供 docker 图片?

how to provide docker image in aws?

在 aws batch 中设置作业定义时,我可以指定容器映像。我可以直接从 docker 集线器存储库指定我的图像吗?

我已经创建了一个 public docker 集线器存储库,但我不确定 aws 是否会直接从那里拉取图像?

是的,我不明白为什么它不起作用。由于 AWS Batch 使用 ECS,ECS 中的 Images 允许以下选项(除其他外):

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).

是的,您可以指定来自Docker Hub 的图像,在ECS 和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.

如果您提到的图片只有一个名字,例如

nginx:latest

作业将从 Docker 中心拉取图像。