mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
Merge ebf47f4443
into 76f9cea516
This commit is contained in:
commit
8ece4966dd
1 changed files with 14 additions and 13 deletions
|
@ -125,20 +125,21 @@ in a volume that may be mounted onto your watchtower container.
|
||||||
1. Create the Dockerfile (contents below):
|
1. Create the Dockerfile (contents below):
|
||||||
```Dockerfile
|
```Dockerfile
|
||||||
FROM golang:1.20
|
FROM golang:1.20
|
||||||
|
|
||||||
ENV GO111MODULE off
|
# Enable Go modules and disable CGO
|
||||||
ENV CGO_ENABLED 0
|
ENV GO111MODULE=on
|
||||||
ENV REPO github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
|
ENV CGO_ENABLED=0
|
||||||
|
# Define the repository to install from
|
||||||
RUN go get -u $REPO
|
ENV REPO=github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login@latest
|
||||||
|
|
||||||
RUN rm /go/bin/docker-credential-ecr-login
|
# Install the necessary dependencies and build the binary
|
||||||
|
RUN go install $REPO
|
||||||
RUN go build \
|
|
||||||
-o /go/bin/docker-credential-ecr-login \
|
# Set the final working directory
|
||||||
/go/src/$REPO
|
|
||||||
|
|
||||||
WORKDIR /go/bin/
|
WORKDIR /go/bin/
|
||||||
|
|
||||||
|
# Set the default command
|
||||||
|
CMD ["docker-credential-ecr-login"]
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Use the following commands to build the aws-ecr-dock-cred-helper and store it's output in a volume:
|
2. Use the following commands to build the aws-ecr-dock-cred-helper and store it's output in a volume:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue