You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edit file under ./backend folder, e.g. add new line.
Watch detects changes and rebuilds both services as expected.
Edit same file under ./backend folder bringing it to the state it was before step 3 (remove new line).
Watch starts to rebuild both services, but fails:
...
service "apiserver" successfully built
Failed to recreate service after update. Error: Error response from daemon: Conflict. The container name "/eaad56074ed9_db" is already in use by container "30b1ad6dcf9135f90dcef865d7de2bfaf1e6a2faa4b3c1ac56351d97e18cf2fa". You have to remove (or rename) that container to be able to reuse that name.
WARN[0011] Error handling changed files for service apiserver: Error response from daemon: Conflict. The container name "/eaad56074ed9_db" is already in use by container "30b1ad6dcf9135f90dcef865d7de2bfaf1e6a2faa4b3c1ac56351d97e18cf2fa". You have to remove (or rename) that container to be able to reuse that name.
Failed to recreate service after update. Error: Error response from daemon: No such container: 30b1ad6dcf9135f90dcef865d7de2bfaf1e6a2faa4b3c1ac56351d97e18cf2fa
WARN[0012] Error handling changed files for service analytics: Error response from daemon: No such container: 30b1ad6dcf9135f90dcef865d7de2bfaf1e6a2faa4b3c1ac56351d97e18cf2fa
As you can see, the error mentions container db. This container dies.
Looks like compose is trying to restart dependencies after rebuilding apiserver but somehow conflict occurs.
The problem does not occur when I run watch only for one service (docker compose watch apiserver)
Compose Version
# docker compose version
Docker Compose version 2.26.1
# docker-compose version
Docker Compose version 2.26.1
After some more time using watch feature, I can say that the bug in the topic starter does not seem related to "depends_on" field. I've removed all depends_on fields and still getting same error about container conflict
Description
I've started to use 'watch' feature for one project, but it fails every time when I change files from state A to state B and then back to state A.
Steps To Reproduce
docker compose watch
.As you can see, the error mentions container db. This container dies.
Looks like compose is trying to restart dependencies after rebuilding apiserver but somehow conflict occurs.
The problem does not occur when I run watch only for one service (docker compose watch apiserver)
Compose Version
Docker Environment
Anything else?
This might be related to #9014
The text was updated successfully, but these errors were encountered: