|
| 1 | +--- |
| 2 | +layout: doc |
| 3 | +title: "AWS ECR - Documentation" |
| 4 | +category: "deployment" |
| 5 | +logo: aws-ecr |
| 6 | +order: 6 |
| 7 | +excerpt: "Deploy your containers to AWS ECR in a few clicks." |
| 8 | +--- |
| 9 | + |
| 10 | +[AWS ECR](https://aws.amazon.com/ecr) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images. |
| 11 | + |
| 12 | +## Specify your AWS credentials |
| 13 | +To deploy to your AWS account, continuousphp needs access keys for IAM users. You can specify them in the 1st step of the project |
| 14 | +setup or simply when adding a new pipeline to your existing project. |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +## Configure the Packaging |
| 19 | +After having configured the tests in the second step, you can now enable Docker in the Packaging configuration. |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +## Configure the Deployment |
| 24 | +Once you have added the IAM credentials and you defined Docker as packaging method, you can configure the deployment in the 4th step of the project/pipeline setup. |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +## Use environment variables to define your tags |
| 29 | +continuousphp provides you with a set of built-in environment variables that you can use to define your tags. Moreover you may want to truncate those variables then you can use the following syntax : |
| 30 | + |
| 31 | +* ***CPHP_GIT_COMMIT*** : 225ff5830d804093869e5d8b6516aa7b |
| 32 | +* ***${CPHP_GIT_COMMIT}*** : 225ff5830d804093869e5d8b6516aa7b |
| 33 | +* ***${CPHP_GIT_COMMIT:0,7}*** : 225ff58 |
| 34 | +* ***${CPHP_GIT_COMMIT:7}*** : 30d804093869e5d8b6516aa7b |
| 35 | +* ***${CPHP_GIT_COMMIT:-12}*** : 5d8b6516aa7b |
| 36 | + |
| 37 | +!!! note "**IMPORTANT**" |
| 38 | + Make sure that the IAM credentials you provide only have the strict minimum of permissions. For instance |
| 39 | + the provided IAM credentials shouldn't be able to erase your ECR repository. |
| 40 | + |
| 41 | +And that's it! You just configured your Dockerfile to be deployed with AWS ECR. |
0 commit comments