2

I am trying to set up docker for my node js and typescript project and getting following error when trying to run docker-compose run --service-ports web

my composer file looks like below

services:
  web:
    image: node:alpine
    ports:
      - "3001:3001"
    volumes:
      - .:/my-project
    environment:
      NODE_ENV: 'dev'
    entrypoint: /bin/bash
    tty: true

Docker Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown

user269867
  • 3,266
  • 9
  • 45
  • 65

2 Answers2

6

That image doesn't have bash installed. Try with entrypoint: ["sh"]

gasc
  • 638
  • 7
  • 14
2

Alpine Linux uses almquist shell, so you have to call your script with ash instead of bash. As well check that your shell scripts are referring to correct unix shell e.g #!/bin/ash

Lukasz Dynowski
  • 11,169
  • 9
  • 81
  • 124