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

Trying to Restart an Application on File Change #187

Closed
HertelDavid opened this issue Feb 17, 2022 · 3 comments
Closed

Trying to Restart an Application on File Change #187

HertelDavid opened this issue Feb 17, 2022 · 3 comments

Comments

@HertelDavid
Copy link

Environment

macOS Monterey 12.0.1

colima version

colima version 0.3.3
git commit: ac876a5d9e4eda7d1d015896ebfbe1dd16b8c203

runtime: docker
arch: x86_64
client: v20.10.12
server: v20.10.11

Issue

I'm attempting to volume mount the source code of a typescript application so that I can change the code locally and have it show up within the running container. I'm also using a file watcher to restart the application when file changes do happen using ts-node-dev but I'm not sure if the file changes are being picked up within the container.

When I open a terminal into the container I can see the file has changed but the application hasn't restarted. I also ran an experiment where I installed chokidar and ran a script to see file changes within the container but that wasn't picking up changes either.

I'm wondering if anyone else has been able to get file change events working for them in containers running in colima?

@ggoodman
Copy link

I've just run into this issue as well. I wonder if it has something to do with how fs events are triggered (or more importantly, are not triggered) on the sshfs mount from the host.

@abiosoft
Copy link
Owner

This is a limitation of sshfs and currently being tracked upstream in Lima lima-vm/lima#615.

@abiosoft
Copy link
Owner

You can try out the development version brew install --HEAD colima and try the experimental --mount-inotify flag?

colima start --mount-inotify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants