Skip to content

Commit

Permalink
fix ecr credentials helper
Browse files Browse the repository at this point in the history
  • Loading branch information
brunodasilvalenga committed Dec 20, 2023
1 parent eea1533 commit 66d321a
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
FROM golang:1.13 AS build-ecr-plugin

RUN go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
WORKDIR /go/src/github.com/awslabs/amazon-ecr-credential-helper
RUN make linux-amd64

FROM docker

ENV AWS_ECR_CRED_HELPER_VERSION="v0.7.1"

RUN apk --no-cache update && \
apk --no-cache add --upgrade \
make \
Expand All @@ -14,7 +10,7 @@ RUN apk --no-cache update && \
curl \
py-pip \
openssl \
openssh \
openssh \
bash \
gettext \
g++ \
Expand All @@ -24,14 +20,15 @@ RUN apk --no-cache update && \
openssl-dev \
libffi-dev \
musl-dev \
docker-compose && \
python3 -m pip --no-cache-dir install --upgrade pip && \
docker-compose \
wget && \
update-ca-certificates && \
wget -nv -O /bin/docker-credential-ecr-login \
https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/${AWS_ECR_CRED_HELPER_VERSION#v}/linux-amd64/docker-credential-ecr-login \
&& chmod +x /bin/docker-credential-ecr-login && \
rm -rf /var/tmp/ && \
rm -rf /tmp/* && \
rm -rf /var/cache/apk/*

COPY --from=build-ecr-plugin /go/src/github.com/awslabs/amazon-ecr-credential-helper/bin/linux-amd64/docker-credential-ecr-login /bin

RUN mkdir -p ~/.docker && \
RUN mkdir -p ~/.docker && \

Check failure on line 33 in Dockerfile

View workflow job for this annotation

GitHub Actions / hadolint

DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.

Check failure on line 33 in Dockerfile

View workflow job for this annotation

GitHub Actions / hadolint

DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
echo > ~/.docker/config.json '{ "credsStore": "ecr-login" }'

0 comments on commit 66d321a

Please sign in to comment.