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
And then while stopped I change some files, and start the container up again via Docker Desktop, the files are not re-synced until I manually do CTRL + S in something like Visual Studio on the host (I am assuming when I do this the file modification date changes and watch picks it up) or stop the whole compose stack and start over again. Ideally, when the container is started any changed files are picked up without having to manually trigger the watch sync via forcing a file modification time change or a full restart of the compose stack.
I think specifically what I mean is for:
x-initialSync: true
Can this be not only an initial sync on compose stack start but an initial sync on a container that has been stopped and started within the runtime of a watching compose stack i.e. when the container is restarted pick up any files where last modified date is after the time the container was stopped.
Use case for this is when working with .NET projects hot reloading and debugging via attach to process can be annoying because after a hot reload we can no longer attach to the Docker container until the container is restarted. So instead sometimes we stop a single .NET container, do some debugging and make some file changes on the host PC and when done bring the container up again.
For context I am using Windows and Docker Compose v2.32.4.
The text was updated successfully, but these errors were encountered:
harperl1
changed the title
When stopping and starting a container, docker compose watch specification should sync any changed files
Docker compose watch should sync any changed files changed while a container in the compose stack has been stopped and started
Feb 28, 2025
harperl1
changed the title
Docker compose watch should sync any changed files changed while a container in the compose stack has been stopped and started
Docker compose watch should sync any changed files changed after a container in the compose stack has been stopped and started
Feb 28, 2025
harperl1
changed the title
Docker compose watch should sync any changed files changed after a container in the compose stack has been stopped and started
Ensure Docker Compose syncs file changes after a container in the stack is stopped, modified, and restarted
Feb 28, 2025
As you start container by Docker Desktop UI (or docker stop / docker start command), compose is not involved. initialSync is only supported by Compose and is not part of the container definition (this is a client feature, docker engine isn't aware)
I'm closing this issue as "not planned": watch is a compose feature, only supported when using compose commands
Description
Hi,
Currently if I stop a container via Docker Desktop etc in a specification like below:
docker compose --profile x -f docker-compose.yml --watch --build
And then while stopped I change some files, and start the container up again via Docker Desktop, the files are not re-synced until I manually do CTRL + S in something like Visual Studio on the host (I am assuming when I do this the file modification date changes and watch picks it up) or stop the whole compose stack and start over again. Ideally, when the container is started any changed files are picked up without having to manually trigger the watch sync via forcing a file modification time change or a full restart of the compose stack.
I think specifically what I mean is for:
x-initialSync: true
Can this be not only an initial sync on compose stack start but an initial sync on a container that has been stopped and started within the runtime of a watching compose stack i.e. when the container is restarted pick up any files where last modified date is after the time the container was stopped.
Use case for this is when working with .NET projects hot reloading and debugging via attach to process can be annoying because after a hot reload we can no longer attach to the Docker container until the container is restarted. So instead sometimes we stop a single .NET container, do some debugging and make some file changes on the host PC and when done bring the container up again.
For context I am using Windows and Docker Compose v2.32.4.
The text was updated successfully, but these errors were encountered: