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
{{ message }}
Repository navigation
Docker on windows - Automatic rebuild not triggered on save from host #5212
Run up a new docker container with a mounted drive from PowerShell
Install @angular/cli
create a new app
serve the app
make changes from a text editor in the host machine and save
the app does not re-transpile
Commands run are listed below (output removed for brevity)
> docker run -it -p 4200:4200 -p 49153:49153 -v ${pwd}:/app -w /app node /bin/bash
root@3c96e8d8df57:/app# npm i -g @angular/cli
root@3c96e8d8df57:/app# ng new test-app --skip-npm
root@3c96e8d8df57:/app# cd test-app
root@3c96e8d8df57:/app/test-app# npm i
root@3c96e8d8df57:/app/test-app# ng serve --host 0.0.0.0
Once the app is up and running I open the app folder with VSCode on my host machine and edit a file, for example removing the production mode check in main.ts and save the changes.
I would expect that this action triggers a rebuild of the app as happens when I do this right on the windows host machine
Activity
clydin commentedon Mar 3, 2017
With your setup you may need to use the '--poll' option with a reasonable value based on your needs (value is in milliseconds).
hansl commentedon Mar 3, 2017
Closing as working as intended.
gavinbarron commentedon Mar 4, 2017
Thank you!!! that has solved the problem Legends :)
Corsseir commentedon Aug 11, 2017
'--poll' flag consumes a lot of cpu so this is not a solution.
smoke commentedon Aug 11, 2017
@Corsseir my 2 cents - this is OS specific and currently I don't believe there is a better way in this combination - docker + Windows
Corsseir commentedon Aug 11, 2017
Hm, ok. I though that Windows would be ok for web development since vagrant and docker but I was wrong. Its time to migrate to Linux I guess.
holms commentedon Apr 23, 2018
--poll flag doesn't give any results at all, all ports opened, by changing template no webpack rebuild happens
erensogut543 commentedon Nov 21, 2018
@Corsseir as he said , after '--poll' my pc consume lots of cpu. Are there any way to ho reloding an angular app with docker ?
angular-automatic-lock-bot commentedon Sep 8, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.