0

I am currently setting up a New Project. I created a pipeline that runs the Build with no Issues.

The problem occurs at Deploy. I get the following error from /var/log/eb-engine.log. The command that causes the error is executed by the Deploy. I am not running it intentionally:

[INFO] Running command /bin/sh -c docker rmi `docker images -aq`

Error response from daemon: conflict: unable to delete 123456789 (cannot be forced) - image has dependent child images
Error response from daemon: conflict: unable to delete 234567891 (cannot be forced) - image is being used by running container 3456789dbd
Error response from daemon: conflict: unable to delete 456789123 (cannot be forced) - image has dependent child images
Error response from daemon: conflict: unable to delete 567891234 (cannot be forced) - image has dependent child images

[INFO] Running command /bin/sh -c docker images -a
[INFO] REPOSITORY                             TAG       IMAGE ID       CREATED       SIZE
aws_beanstalk/current-app              latest    234567891    2 hours ago   906MB
<none>                                 <none>    123456789    2 hours ago   906MB
<none>                                 <none>    456789123    2 hours ago   906MB
public.ecr.aws/docker/library/python   3.8       567891234    2 weeks ago   906MB

This is my Dockerrun.aws.json

{
  "AWSEBDockerrunVersion": "1",
  "containerDefinitions": [
    {
      "name": "myproject",
      "image": "{$AWSID}.dkr.ecr.{$AWSREGION}.amazonaws.com/myproject",
      "hostname": "myproject",
      "portMappings": [
        {
          "hostPort": 80,
          "containerPort": 3000
        }
      ],
      "memory": 2024
    }
  ]
}

and my docker-compose.yml

version: "3.7"

services:
  myproject:
    container_name: myproject
    ports:
      - "80:3000"
    build:
      context: ./
      dockerfile: somefolder/Dockerfile    

    volumes:
      - ./:/var/www/somefolder/fetcher

I tried creating new environments several times, changing the container name, deleting the mentioned image from the file buildspec.yml, but actually, If I run docker ps -a I get no running containers.

I wonder if there is any relation with another running Elastic Beanstalk instance or if I have some configuration problem.

Any idea of what could be happening or somebody had a similar issue?

Alvin
  • 762
  • 4
  • 14
  • 1
    I'm running into the same problem. I don't have a dockerrun.aws.json file but my logs indicate that the containers are spun up and then it seems that ElasticBeanstalk immediately tries to clean them up. I'll let you know if I find a solution. – Kellen Busby Jun 14 '23 at 19:01
  • @KellenBusby Finally for me the project deployed changing project-related stuff but the error is still there, not affecting the result at least – Alvin Jun 15 '23 at 20:46
  • yea same experience here - I had other errors that weren't related to those "unable to delete" errors - total red herrings. Thanks for following up. – Kellen Busby Jun 16 '23 at 00:28

0 Answers0