amazon web services - docker swarm and aws ecr authentication using api keys -
i'm having trouble pulling docker images aws ecr when deploying stack docker swarm cluster runs in aws ec2.
if try ssh of nodes , authenticate manually , pull image manually, there no issues
this works:
root@manager1 ~ # `aws ecr get-login --no-include-email --region us-west-2 ` login succeeded root@manager1 ~ # docker pull *****.dkr.ecr.us-west-2.amazonaws.com/myapp:latest
however, if try deploying stack or service:
docker stack deploy --compose-file docker-compose.yml myapp
the image can't found , on node authenticated on other manager/worker nodes.
error docker service ps myapp :
"no such image: *****.dkr.ecr.us-west-2.amazonaws.com/myapp:latest"
os: rhel 7.3 docker version: docker version 1.13.1-cs5, build 21c42d8
anyone have solution issue?
try command
docker login -u username -p password *****.dkr.ecr.us-west-2.amazonaws.com && docker stack deploy --compose-file docker-compose.yml myapp --with-registry-auth
Comments
Post a Comment