I'm trying to set up some infrastructure using AWS ECR to store docker images. I'm just wondering if I have access to the same base images that I do in the docker hub. E.G. FROM node
works in my Dockerfile after I log in to ECR. I'm just wondering where this image is getting pulled from. I can't find anything regarding a public ECR repository that stores base images. Thanks.
Asked
Active
Viewed 281 times
2

Max Paymar
- 588
- 1
- 7
- 23
1 Answers
2
The name of a Docker image identifies the repository that it comes from. For example:
docker pull aws_account_id.dkr.ecr.us-west-2.amazonaws.com/amazonlinux:latest
The registry is aws_account_id.dkr.ecr.us-west-2.amazonaws.com
, the image name is amazonlinux
, and the version is latest
. The punctuation characters /
and :
separate these three components.
When you pull from Docker hub, you don't have a registry name, just an image name and version (node:latest
).
When you run docker login
, it adds credentials to those known by Docker. You can login to as many registries as you want. When you then run docker pull
, it looks to see if it has credentials for the specific registry.

guest
- 36
- 1