|
|
|
@ -103,7 +103,6 @@ Use the dockerfile below to build the [amazon-ecr-credential-helper](https://git
|
|
|
|
|
in a volume that may be mounted onto your watchtower container.
|
|
|
|
|
|
|
|
|
|
1. Create the Dockerfile (contents below):
|
|
|
|
|
|
|
|
|
|
```Dockerfile
|
|
|
|
|
FROM golang:latest
|
|
|
|
|
|
|
|
|
@ -122,7 +121,6 @@ in a volume that may be mounted onto your watchtower container.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
2. Use the following commands to build the aws-ecr-dock-cred-helper and store it's output in a volume:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Create a volume to store the command (once built)
|
|
|
|
|
docker volume create helper
|
|
|
|
@ -131,13 +129,12 @@ in a volume that may be mounted onto your watchtower container.
|
|
|
|
|
docker build -t aws-ecr-dock-cred-helper .
|
|
|
|
|
|
|
|
|
|
# Build the command and store it in the new volume in the /go/bin directory.
|
|
|
|
|
docker run -d --rm --name aws-cred-helper --volume helper:/go/bin aws-ecr-dock-cred-helper
|
|
|
|
|
|
|
|
|
|
docker run -d --rm --name aws-cred-helper \
|
|
|
|
|
--volume helper:/go/bin aws-ecr-dock-cred-helper
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
3. Create a configuration file for docker, and store it in $HOME/.docker/config.json (replace the <AWS_ACCOUNT_ID>
|
|
|
|
|
placeholders with your AWS Account ID):
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"credsStore" : "ecr-login",
|
|
|
|
@ -154,7 +151,6 @@ in a volume that may be mounted onto your watchtower container.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
4. Create a docker-compose file (as an example) to help launch the container:
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
version: "3.4"
|
|
|
|
|
services:
|
|
|
|
|