Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build a public registry in AWS ECR (Elastic Container Registry)? #38

Open
japananh opened this issue Jan 15, 2025 · 0 comments
Open
Assignees
Labels

Comments

@japananh
Copy link
Owner

japananh commented Jan 15, 2025

How to build a public registry in AWS ECR (Elastic Container Registry)?

# Set up AWS CLI
aws configure

# Create a Public ECR Repository
aws ecr-public create-repository --repository-name redis --region <region>

# Authenticate Docker to ECR:
# public repo URI = public.ecr.aws/xxxx
aws ecr-public get-login-password --region <region> | docker login --username AWS --password-stdin <public repo URI>

# Pull image from DockerHub
# Need to specify platform to avoid error because docker will pull image version to match your current running OS
docker pull --platform=linux/amd64/v4 redis:latest

# Tag image
docker tag redis:latest public.ecr.aws/<account_id>/redis:latest

# Push image to ECR
docker push public.ecr.aws/<account_id>/redis:latest

# Verify image exists in ECR
aws ecr-public describe-images --repository-name redis --region <region>
@japananh japananh added the aws label Jan 15, 2025
@japananh japananh self-assigned this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant