I wrote a node server and I'd like to wrap it with docker compose for development (later I'll add more services). This is my docker-compose.yml:
version: '3'
services:
server:
image: node:alpine
volumes:
- ./
working_dir: /.
environment:
NODE_ENV: development
ports:
- 8009:8009
command: npm run dev
When running docker-compose up I get:
Recreating bed_server_1 ... error
ERROR: for bed_server_1 Cannot start service server: OCI runtime create failed: container_linux.go:348: starting container process caused "open /proc/self/fd: no such file or directory": unknown
ERROR: for server Cannot start service server: OCI runtime create failed: container_linux.go:348: starting container process caused "open /proc/self/fd: no such file or directory": unknown
ERROR: Encountered errors while bringing up the project.
I am using mac. Any idea what is wrong?
This error may occurs because of the volume. You should try to remove these lines:
volumes:
- ./
Then try to map the folder to a volume declared in the docker-compose file, like that:
services:
server:
image: node:alpine
volumes:
- test_volume:./
working_dir: /.
environment:
NODE_ENV: development
ports:
- 8009:8009
command: npm run dev
volumes:
test_volume:
external: true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With