Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2020-11-15 22:46:06
Size: 457
Editor: PieterSmit
Comment:
Revision 4 as of 2021-08-03 01:58:17
Size: 1206
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
 * Get credentials
   1. Get aws login password/token {{{
> aws ecr --region "ap-southeast-2" --profile prod get-login-password
}}}
   2. Login with docker, save creds to ~/.docker {{{
> docker login --username AWS --password-stdin <awsSubscription>.dkr.ecr.ap-southeast-2.amazonaws.com
}}}
      * 2021 login with AWS sso {{{
$ aws ecr get-login-password --region ap-southeast-2 --profile sso | docker login --username AWS --password-stdin 123456789.dkr.ecr.ap-southeast-2.amazonaws.com
}}}
  
  3. Pull container {{{
$ docker pull 123456789.dkr.ecr.ap-southeast-2.amazonaws.com/mycontainer:release-77
}}}
Line 4: Line 18:
 * Gotchas / error:  * Check size of a container {{{
docker history --human --format "{{.CreatedBy}}: {{.Size}}" <container name>
}}}

 
=== Gotchas / error: ===

docker/AwsEcr

  • AWS Elastic container registry
  • Get credentials
    1. Get aws login password/token

      > aws ecr --region "ap-southeast-2" --profile prod get-login-password
    2. Login with docker, save creds to ~/.docker

      > docker login --username AWS --password-stdin <awsSubscription>.dkr.ecr.ap-southeast-2.amazonaws.com
      • 2021 login with AWS sso

        $ aws ecr get-login-password --region ap-southeast-2 --profile sso | docker login --username AWS --password-stdin 123456789.dkr.ecr.ap-southeast-2.amazonaws.com
    1. Pull container

      $ docker pull 123456789.dkr.ecr.ap-southeast-2.amazonaws.com/mycontainer:release-77
  • Check size of a container

    docker history --human --format "{{.CreatedBy}}: {{.Size}}" <container name>

Gotchas / error:

  • Error on docker login

    ** Message: 11:37:15.275: Remote error from secret service: org.freedesktop.Secret.Error.IsLocked: Cannot create an item in a locked collection
    Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot create an item in a locked collection`
    • Solved by installing packages gnupg and pass. :( not sure why.

docker/AwsEcr (last edited 2021-08-03 01:58:17 by PieterSmit)