见(https://aws.amazon.com/getting-started/tutorials/deploy-docker-containers/)
docker push 734122228327.dkr.ecr.us-east-2.amazonaws.com/joethecoder2:latest
ssh -i“containerservice.pem”ec2-user@ec2-18-217-248-112.us-east-2.compute.amazonaws.com 主持人'ec2-18-217-248-112.us-east-2.compute.amazonaws.com(18.217.248.112)'的真实性无法确定。 ECDSA密钥指纹是SHA256:wCeAUed36nKeQjEbSDsYjzq8Z5mpNY4pbcahw2mSozs。 您确定要继续连接(是/否)吗?是 警告:永久性地将'ec2-18-217-248-112.us-east-2.compute.amazonaws.com,18.217.248.112'(ECDSA)添加到已知主机列表中。
| __ | __ | | (_ \ Amazon ECS优化的Amazon Linux AMI 2017.09.d ____ | _ | ____ /
有关文档访问,http://aws.amazon.com/documentation/ecs
[ec2-user @ ip-10-0-0-102~] $ docker ps 集装箱ID图像命令创建状态端口名称 c90a2116f3ab amazon / amazon-ecs-agent:最新的“/ agent”大约一小时前上来大概一小时ecs-agent [ec2-user @ ip-10-0-0-102~] $ docker ps 集装箱ID图像命令创建状态端口名称 c90a2116f3ab amazon / amazon-ecs-agent:最新“/ agent”大约一小时前上传大约一小时ecs-agent
[ec2-user @ ip-10-0-0-102~] $ docker图片 存储标签图像ID创建大小 amazon / amazon-ecs-agent最新2d99efccdfef 3周前26.8MB amazon / amazon-ecs-pause 0.1.0 c846030090b6 3周前964kB [ec2-user @ ip-10-0-0-102~] $
使用Push上传的docker镜像未包含在正在运行的容器服务中,当添加Task时,如同部署docker容器的示例说明一样。 (我在步骤2和3中配置了任务,然后在步骤4中设置了群集)请参阅(https://aws.amazon.com/getting-started/tutorials/deploy-docker-containers/)
但是,当我尝试卷曲服务时,它无法连接: curl ec2-18-217-248-112.us-east-2.compute.amazonaws.com:8080 卷曲:(7)无法连接到ec2-18-217-248-112.us-east-2.compute.amazonaws.com端口8080:拒绝连接
进一步检查显示,应该为joethecoder2运行的docker服务未在应该在容器服务节点ec2-18-217-248-112.us-east-2.compute上运行的docker实例中运行.amazonaws.com