Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local file changes not persisted after container restart with docker-compose watch in dev.sh #353

Open
adnanhashmi09 opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@adnanhashmi09
Copy link
Contributor

adnanhashmi09 commented May 14, 2024

Description

When using dev.sh watching local file changes, the changes are not reflected in the container after restarting it. This issue occurs specifically with the watch command in the development CLI.

Steps to Reproduce

  1. Start the development environment with dev.sh.
  2. Make some changes in the local version of the code which is being watched by dev.sh
  3. Restart the container by quitting dev.sh and then restarting it
  4. The changes made to the local files are not reflected in the container.

Expected Behavior

When restarting the container, the changes made to the local files should be automatically reflected in the container's filesystem.

Actual Behavior

The local file changes are not synced or persisted in the container's filesystem after restarting the container. The file needs to be saved again by hitting Ctrl - S on your text editor for the watch command to sync again.

Additional Context

  • This issue occurs specifically when using the watch command in the development CLI, which is intended to sync local file changes to the container in real-time.
  • The problem seems to be related to the way Docker handles volume mounts and file synchronization when restarting containers.
  • This problem also seems to be macOS related as on linux machines, docker rebuilds the image to sync for local file changes.
@adnanhashmi09 adnanhashmi09 added the bug Something isn't working label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant