Vite server on docker build keeps restarting #14492
Replies: 6 comments 6 replies
-
|
Beta Was this translation helpful? Give feedback.
-
The filesystem watcher is reporting that |
Beta Was this translation helpful? Give feedback.
-
Facing the same issue using |
Beta Was this translation helpful? Give feedback.
-
Had the same issue and the solution was to add a workdir WORKDIR /app @J-Josu and I are trying to understand what is happening there |
Beta Was this translation helpful? Give feedback.
-
i solved this issue using docker volume. mapping working directory to docker volume
|
Beta Was this translation helpful? Give feedback.
-
I needed to use a bind volume and ignore the |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
My current docker file is as follows:
when i build in in docker, it runs with pnpm run dev, but seems to detect changes in the vite.config.ts file and restarts every second
i used pnpm for the build, is their anything wrong in the dockerfile script?
it seems to run fine with npm though
Reproduction
https://stackblitz.com/edit/vitejs-vite-ajmfgr?file=vite.config.ts
Steps to reproduce
Install docker and docker engine
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
sudo apt-get install docker-ce docker-ce-cli containerd.io
then run docker compose
docker compose up -d --build
System Info
Used Package Manager
pnpm
Logs
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions