Open Khazrak opened 9 years ago
I ran into the same problem. I worked around it by mounting a directory to the container's /data
directory instead of directly mounting a file.
broken:
docker run -v responses/products.json:/data/db.json json-server
working:
docker run -v responses:/data json-server products.json
Hi. I run the container with the example json (posts and comments). When I go to the adress: http://localhost:80/posts I get the data but the container crashes. The same if I use curl.
I get the response:
GET /posts 304 16.824 ms - -
/usr/local/lib/node_modules/json-server/node_modules/lowdb/src/disk.js:23 if (err) throw err ^ Error: EBUSY, rename '/data/.~db.json'