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?