|
cd-ci-glue
|
Functions | |
| awsecr_login () | |
| Login to Amazon Elastic Container Registry. (ECR) More... | |
| awsecr_push_image (image) | |
| Push a locally built docker image to Amazon ECR. More... | |
| awsecr_login | ( | ) |
Login to Amazon Elastic Container Registry. (ECR)
Outputs the full AWS ECR repository URL to stdout. (e.g. https://<aws_account_id>.dkr.ecr.<region>.amazonaws.com)
$ export REGISTRY_URL="$(awsecr_login)" || exit 1 $ docker run "${REGISTRY_URL}/madworx/robotframework-kicadlibrary" | awsecr_push_image | ( | image | ) |
Push a locally built docker image to Amazon ECR.
| image | Image identifier to push (e.g. madworx/docshell:3.14). |
This function will as a side-effect tag the local image with the ECR remote registry URL prefix. Will output the complete path to the pushed image onto stdout (e.g. 863710587213.dkr.ecr.eu-north-1.amazonaws.com/madworx/docker-netbsd:8.0).
$ docker build -t madworx/sample:1.0.1 . $ FULL_PATH="$(awsecr_push_image madworx/sample:1.0.1)" || exit 1 $ docker run "${FULL_PATH}"
1.8.18