Git Product home page Git Product logo

amazon-ecr-credential-helper's Introduction

Amazon ECR Docker Credential Helper

Build Status

The Amazon ECR Docker Credential Helper is a credential helper for the Docker daemon that makes it easier to use Amazon EC2 Container Registry.

Prerequisites

You must have at least Docker 1.11 installed on your system.

You also must have AWS credentials available in one of the standard locations:

  • The ~/.aws/credentials file
  • The AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables
  • An IAM role for Amazon EC2
  • If you are working with an assumed role please set the environment variable: AWS_SDK_LOAD_CONFIG=true also.

The Amazon ECR Docker Credential Helper uses the same credentials as the AWS CLI and the AWS SDKs. For more information about configuring AWS credentials, see Configuration and Credential Files in the AWS Command Line Interface User Guide.

The credentials must have a policy applied that allows access to Amazon ECR.

Building and Setup

To build the Amazon ECR Docker Credential Helper, you must have Go 1.5 or greater, and you must have git and make installed on your system.

Clone this repository into your existing GOPATH under src/github.com/awslabs/amazon-ecr-credential-helper, then run make. The resulting binary can be found in bin/local/docker-credential-ecr-login.

Or if you already have Docker environment, just clone this repository anywhere and run make docker. This command builds the binary by Go inside docker container and output it to local directory. With TARGET_GOOS environment variable, you can also cross compile the binary.

Place the docker-credential-ecr-login binary on your PATH and set the contents of your ~/.docker/config.json file to be:

{
	"credsStore": "ecr-login"
}

Usage

docker push 123457689012.dkr.ecr.us-west-2.amazonaws.com/my-repository:my-tag

docker push 123457689012.dkr.ecr.us-west-2.amazonaws.com/my-repository:my-tag

There is no need to use docker login or docker logout.

Troubleshooting

Logs from the Amazon ECR Docker Credential Helper are stored in ~/.ecr/log.

For more information about Amazon ECR, see the the Amazon EC2 Container Registry User Guide.

License

The Amazon ECR Docker Credential Helper is licensed under the Apache 2.0 License.

amazon-ecr-credential-helper's People

Contributors

atbida avatar imerica avatar riywo avatar samuelkarp avatar sentientmonkey avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.