Skip to content
Snippets Groups Projects
Commit c800655e authored by nimrod's avatar nimrod
Browse files

Added ECR credential helper and refactor

- Multi-stage build.
- Base on python:3.7-alpine, add CLI tools from other stages.
parent 2d0f9019
Branches
No related tags found
No related merge requests found
FROM golang:1.10-alpine as ecs
RUN apk add --update --no-cache git build-base
RUN go get github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
RUN wget https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest && \
install -m755 ecs-cli-linux-amd64-latest /usr/local/bin/ecs-cli
FROM docker:latest
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/main > /etc/apk/repositories && \
apk add --update --no-cache python3 && \
pip3 install --no-cache-dir --upgrade awscli docker-compose pip | cat && \
wget https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest && \
install -m755 ecs-cli-linux-amd64-latest /usr/local/bin/ecs-cli && \
rm ecs-cli-linux-amd64-latest
FROM python:3.7-alpine3.7
COPY --from=docker /usr/local/bin/docker /usr/local/bin/
COPY --from=ecs /go/bin/docker-credential-ecr-login /usr/local/bin/ecr-login
COPY --from=ecs /usr/local/bin/ecs-cli /usr/local/bin/
RUN pip install --no-cache-dir --progress-bar=off awscli docker-compose
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment