Docker: OCI runtime create failed + executable file not found in $ PATH

0

Good evening guys,

I have broken my head here to correctly use dockerfile and docker-compose .

I have the image getjv/nodejs:8.11.4 , whenever it starts (container) I already want to raise the Node server with the command: npm start .

But when I pass this on a dockerfile or a docker-compose I get one:

ERROR: for pasta_backend_1  Cannot start service backend: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"npm start\": executable file not found in $PATH": unknown

I gave docker inspect and actually npm is not in the path of the image, but when I access the container there, the command works normally.

I have already read and reread several tips, but I could not lift the container and already send the command.

Here's my docker-compose:

version: '3'
services:
  frontend:
    image: getjv/nodejs
    ports:
      - "4200:4200"
    volumes:
      - D:\xxxxxx:/home
  backend:
    image: getjv/nodejs:8.11.4
    ports:
      - "3000:3000"
    volumes:
      - D:\xxxxxxxx\api:/home
    entrypoint:
      - npm start

Thank you all.

    
asked by anonymous 27.08.2018 / 03:41

0 answers