Sunday, November 6, 2022

[FIXED] Why containers are not restarted?

Issue

I updated docker compose file. Then when I rebuild containers, it seems they are not restarted. Why?

Here we can see that last step is not cached and new image was created:

$ BUILDKIT_PROGRESS=plain docker compose --verbose -p bot -f docker-compose.yml -f docker-compose.dev.yml --env-file etc/db_env.conf up --detach --build
...
#16 [my-perl 12/12] COPY . .
#16 DONE 0.0s

#17 exporting to image
#17 exporting layers 0.0s done
DEBU[0001] stopping session                             
#17 writing image sha256:f64d73e7d5c5d5baa69df94dfc083bac08fd8395ae86e25204bad45d20007134 done
#17 naming to docker.io/library/bot_app done
#17 DONE 0.1s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 2/0
 ⠿ Container bot-db-1   Running                                                      0.0s
 ⠿ Container bot-app-1  Running                            

Solution

Found answer: https://github.com/docker/compose/issues/9259

This is a bug and fixed at docker compose 2.6.1. Mine version is 2.3.3



Answered By - Eugen Konkov
Answer Checked By - Robin (PHPFixing Admin)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.