How can I my New Image? Beanstalk docker use old image. dockerrun.aws.json v1, failed old remove image. It looks like beanstalk bug.

0

I have failed deploy, so I watched logs, and I realized that it using old code.

to make sure, I made new Beanstalk Environtment ,and it is working good.

So I checked my beanstalk logs, and there are something weird. It seems like failing to remove old images.

[INFO] Error response from daemon: conflict: unable to delete 127a3e1be9bf (cannot be forced)

How can I use new Image?

Dockerrun.aws.json

{
  "AWSEBDockerrunVersion": "1",
  "Image": {
    "Name": "528729501303.dkr.ecr.ap-northeast-2.amazonaws.com/roa-advertiser:latest",
    "Update": "true"
  },
  "Ports": [
    {
      "ContainerPort": 3000,
      "HostPort": 80
    }
  ]
}

eb-engine.log

2023/07/05 04:24:15.190283 [INFO] docker container 6d7718357199 is running aws_beanstalk/current-app
2023/07/05 04:24:15.190297 [INFO] Cleanup images ...
2023/07/05 04:24:15.190310 [INFO] Running command /bin/sh -c docker images -a
2023/07/05 04:24:15.293311 [INFO] REPOSITORY                                                         TAG       IMAGE ID       CREATED         SIZE
aws_beanstalk/current-app                                          latest    127a3e1be9bf   9 seconds ago   2.34GB
528729501303.dkr.ecr.ap-northeast-2.amazonaws.com/roa-advertiser   latest    d00a89acf429   2 weeks ago     2.34GB

2023/07/05 04:24:15.293359 [INFO] Running command /bin/sh -c docker rmi `docker images -aq`
2023/07/05 04:24:15.440184 [INFO] Error response from daemon: conflict: unable to delete 127a3e1be9bf (cannot be forced) - image is being used by running container 6d7718357199
Error response from daemon: conflict: unable to delete d00a89acf429 (cannot be forced) - image has dependent child images

2023/07/05 04:24:15.440226 [INFO] Running command /bin/sh -c docker images -a
2023/07/05 04:24:15.504625 [INFO] REPOSITORY                                                         TAG       IMAGE ID       CREATED         SIZE
aws_beanstalk/current-app                                          latest    127a3e1be9bf   9 seconds ago   2.34GB
528729501303.dkr.ecr.ap-northeast-2.amazonaws.com/roa-advertiser   latest    d00a89acf429   2 weeks ago     2.34GB
asked 10 months ago364 views
1 Answer
0

Not sure why the image cannot be overwritten, but how about stopping the container as described in the error?
If I stop the following containers, will I be able to update them?
Possibly the container needs to be deleted.

image is being used by running container 6d7718357199

profile picture
EXPERT
answered 10 months ago
  • I'm sure, stop ec2 then it will be work, directly. because, new beanstalk environment with same setting is working well. As far as I know, Beanstalk manages containers, but there seems to be a problem with that.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions