Description
Describe the bug
When using Docker with a local volume, as described in the docs, the server doesn't respond to file changes in the mounted volume.
To Reproduce
Create local directories, e.g.
test/
├── mocks/
│ ├── routes/
│ │ └── route.json
│ └── collections.json
with a valid routes and collections in route.json and collections.json respectively.
Then run mocks-server in docker mounting the test
directory as a volume
docker run -ti -p 3100:3100 -p 3110:3110 -v C:\test:/input mocksserver/main
Go to the URL configured in route.json, it should return as expected. Now change the route in route.json so that it returns something else. It will continue to return the initial response.
Expected behavior
If a file in the mocks/
directory is updated, the mocks-server should pick up that change and server whatever the current response is.
Operating system, Node.js an npm versions, or browser version (please complete the following information):
- OS: Windows 10
- Docker: 20.10.22
Additional context
If you open a shell inside the docker container and check the file, it is updated as expected, so it seems to be mocks-server not responding to the file change rather than docker not updating the file inside the container.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status