Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker compose fails

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?

like image 989
Naor Avatar asked Jul 16 '26 15:07

Naor


1 Answers

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
like image 57
veben Avatar answered Jul 19 '26 07:07

veben



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!