Skip to content

Instantly share code, notes, and snippets.

@niko-dunixi
Last active January 6, 2021 21:45
Show Gist options
  • Save niko-dunixi/afe998ee23190a8faf59283b83792186 to your computer and use it in GitHub Desktop.
Save niko-dunixi/afe998ee23190a8faf59283b83792186 to your computer and use it in GitHub Desktop.
Personal/Public docker mirrors

TODO: make this generic

  1. If you haven't, create your mirror ECRs. Make sure they're public
  2. Open the Cloud9 IDE
  3. Run the commands below to pull the public images and push them up for our own personal reuse
$ docker pull golang:1.15
$ docker pull python:3
$ docker pull amazonlinux:latest
$ docker tag python:3 public.ecr.aws/l1p5w9g7/my-mirrors/python:3
$ docker tag golang:1.15 public.ecr.aws/l1p5w9g7/my-mirrors/golang:1.15 
$ docker tag amazonlinux:latest public.ecr.aws/l1p5w9g7/my-mirrors/amazonlinux:latest
$ aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/l1p5w9g7
$ docker push public.ecr.aws/l1p5w9g7/my-mirrors/python:3
$ docker push public.ecr.aws/l1p5w9g7/my-mirrors/golang:1.15
$ docker push public.ecr.aws/l1p5w9g7/my-mirrors/amazonlinux:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment