Created
July 22, 2020 11:42
-
-
Save xgenvn/5678947d278dfebaaa084e18be74ea34 to your computer and use it in GitHub Desktop.
Portainer ECR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| portainer: | |
| image: aws-portainer:latest | |
| command: -H tcp://tasks.agent:9001 --tlsskipverify | |
| environment: | |
| AWS_ACCESS_KEY_ID: MY_ACCESS_KEY | |
| AWS_SECRET_ACCESS_KEY: MY_SECRET_ACCESS_KEY | |
| ports: | |
| - "9000:9000" | |
| volumes: | |
| - portainer_data:/data | |
| networks: | |
| - agent_network | |
| deploy: | |
| mode: replicated | |
| replicas: 1 | |
| placement: | |
| constraints: [node.role == manager] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM golang:1.9 as ecr-helper | |
| 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 | |
| FROM busybox as busybox | |
| RUN which busybox | |
| FROM portainer/portainer:latest | |
| ENV HOME=/ | |
| COPY --from=ecr-helper /go/src/github.com/awslabs/amazon-ecr-credential-helper/bin/local/docker-credential-ecr-login /bin/docker-credential-ecr-login | |
| COPY config.json /.docker/config.json | |
| COPY --from=busybox /bin/busybox /bin/busybox | |
| RUN ["/bin/busybox","--install","-s","/bin"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment