[英]Docker Error response from daemon: OCI runtime create failed
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
我正在尝试为我的节点js和typescript项目设置docker-compose run --service-ports web
并在尝试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 来自守护程序的Docker错误响应:OCI运行时创建失败:container_linux.go:348:启动容器进程导致“ exec:\\” / bin / bash \\”:stat / bin / bash:无此类文件或目录”:未知
That image doesn't have bash
installed. 该映像没有安装bash
。 Try with entrypoint: ["sh"]
尝试使用entrypoint: ["sh"]
Alpine Linux uses almquist shell , so you have to call your script with ash instead of bash . Alpine Linux使用almquist shell ,因此您必须使用ash而不是bash来调用脚本。 As well check that your shell scripts are referring to correct unix shell eg #!/bin/ash
还要检查您的shell脚本是否指向正确的unix shell,例如#!/bin/ash
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.