Skip to content

Drone plugin for publishing Docker images to the EC2 Container Registry

License

Notifications You must be signed in to change notification settings

kushtrimjunuzi/drone-ecr

 
 

Repository files navigation

drone-ecr

Build Status Coverage Status

Drone plugin to build and publish Docker images to AWS EC2 Container Registry. For the usage information and a listing of the available options please take a look at the docs.

Build

Build the binary with the following commands:

go build
go test

Docker

Build the docker image with the following commands:

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo
docker build --rm=true -t plugins/ecr .

Please note incorrectly building the image for the correct x64 linux and with GCO disabled will result in an error when running the Docker image:

docker: Error response from daemon: Container command
'/bin/drone-ecr' not found or does not exist..

Usage

Execute from the working directory:

docker run --rm \
  -e PLUGIN_TAG=latest \
  -e PLUGIN_REPO=octocat/hello-world \
  -e ECR_ACCESS_KEY=N1DOBESIHFPDZBI2YBGA \
  -e ECR_SECRET_KEY=HdUp4yYnTjeDaYfH2NICMdHg0V5qHdpce1vxAySv \
  -e ECR_REGION=us-east-1 \
  -e ECR_CREATE_REPOSITORY=true \
  -e DRONE_COMMIT_SHA=d8dbe4d94f15fe89232e0402c6e8a0ddf21af3ab \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  --privileged \
  plugins/ecr --dry-run

About

Drone plugin for publishing Docker images to the EC2 Container Registry

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%