我在 Dockerrun.aws.json 中有 "Update": "true",当我在 ECR 中更新图像时,它应该会自动更新 EC2 iontance 中的图像和容器。
但是当我在推送新图像后 ssh 进入实例时,我仍然看到容器和图像未更新。
[root@ip-10-20-60-125 ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c8e3bab8da13 258e7bc272bd "./graphhopper.sh we..." 8 days ago Up 8 days 8989/tcptender_mayer
[root@ip-10-20-60-125 ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE aws_beanstalk/current-app latest 258e7bc272bd 8 天前 813MB openjdk 8-jdk b8d3f94869bb 6 周前 625MB
Dockerrun.aws.json 有这个
{
"AWSEBDockerrunVersion": "1",
"Authentication": {
"Bucket": "xxxxx",
"Key": "xxxxx"
},
"Image": {
"Name": "213074117100.dkr.ecr.us-east-1.amazonaws.com/xxxxx:latest",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "8989"
}
],
"Volumes": [
{
"HostDirectory": "/data",
"ContainerDirectory": "/data"
}
],
"Logging": "/var/log/eb",
"Command": "xxxxx"
}
除了 update: "true" 之外还有其他设置吗?
如果我进行 eb 部署,它将拉取并更新。但是当我更新图像时,“更新”:“真”应该会自动拉取和更新,而这并没有发生。