Expected behavior
Hot reloading works for containers when a volume is shared between the host and the container.
Actual behavior
File changes can be seen between the host and the container as expected, however, no hot reloading occurs in any framework.
Information
- Linux distro: 22.04 LTS
- Distro version: Ubuntu
- Docker Desktop Version: 4.9.1 (81317)
Steps to reproduce the behavior
- Clone the repo at https://github.com/ryan-cahill/nuxt-test-app
- Navigate to the cloned repo's directory root and run
docker build . -t nuxt-reload && docker run -it -p 0.0.0.0:3000:3000 -v $(pwd)/src:/usr/src/app/src --name nuxt-reload nuxt-reload to build and run the Docker container.
- On your local machine, modify any vue file in the app, for example
src/pages/index.vue.
- Run
docker exec -it nuxt-reload sh to exec into the container, then when in the container, run cat /usr/src/app/src/pages/index.vue and notice that your file changes have taken effect.
- Notice that the app hasn't hot reloaded in either the terminal or in your browser. If for example you just ran the app with
npm run dev on your host, the app would hot reload when file changes are made. After installing Docker Desktop for Linux, hot reloading no longer works for any application of mine that I run inside of Docker.
- Please let me know if I can provide any more information, tests, context, etc.
Expected behavior
Hot reloading works for containers when a volume is shared between the host and the container.
Actual behavior
File changes can be seen between the host and the container as expected, however, no hot reloading occurs in any framework.
Information
Steps to reproduce the behavior
docker build . -t nuxt-reload && docker run -it -p 0.0.0.0:3000:3000 -v $(pwd)/src:/usr/src/app/src --name nuxt-reload nuxt-reloadto build and run the Docker container.src/pages/index.vue.docker exec -it nuxt-reload shto exec into the container, then when in the container, runcat /usr/src/app/src/pages/index.vueand notice that your file changes have taken effect.npm run devon your host, the app would hot reload when file changes are made. After installing Docker Desktop for Linux, hot reloading no longer works for any application of mine that I run inside of Docker.