4

I have "Update": "true" in Dockerrun.aws.json which should automatically update the image and container in the EC2 ionstance when i update the image in ECR.

But when i ssh into the instance after pushing a new image , i still see the container and image not updated.

[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/tcp tender_mayer

[root@ip-10-20-60-125 ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE aws_beanstalk/current-app latest 258e7bc272bd 8 days ago 813MB openjdk 8-jdk b8d3f94869bb 6 weeks ago 625MB

Dockerrun.aws.json has this

{
  "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"
}

Is there a setting somewhere other than update: "true" ?

If i do a eb deploy, it will pull and update. But "Update": "true" should pull and update automatically when i update the image, which is not happening.

1 Answers1

0

From this AWS Documentation and this thread AWS Beanstalk docker image automatic update doesn't work it seems that update=true just does the docker pull before docker run and it will not update the container on a new image update.

From my current research, it seems there is no way to automate this process at this moment.

Anand
  • 693
  • 1
  • 8
  • 26