简体   繁体   English

来自守护程序的Docker错误响应:OCI运行时创建失败

[英]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.

相关问题 Docker:来自守护进程的错误响应:OCI 运行时创建失败:container_linux.go:296: - Docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: Docker公开端口-OCI运行时创建失败 - Docker expose port - OCI runtime create failed 我正在尝试从一个小项目的图像创建一个容器,但我收到一个错误:docker: 来自守护进程的错误响应 - I'm trying to create a container from an image of a small project, but I get an error: docker: Error response from daemon 来自守护程序的错误响应:驱动程序在端点 modest_aryabhata 上编程外部连接失败 - Error response from daemon: driver failed programming external connectivity on endpoint modest_aryabhata OCI 运行时执行失败:执行失败:container_linux.go:344:启动容器进程 - OCI runtime exec failed: exec failed: container_linux.go:344: starting container process mongodb无法通过mup安装程序启动(无法连接到Docker守护程序) - mongodb failed to launch with mup setup (Cannot connect to the Docker daemon) 准备失败:无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程 - Preparation failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock docker 容器中的运行时错误,找不到模块 - Runtime error in docker container, Module not found Docker:来自服务器的空响应 - Docker: Empty response from server Docker守护程序无法找到Dockerfile - Docker daemon unable to find the dockerfile
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM