OCI runtime create failed: container_linux.go:349: starting container process caused exec: \xxxx\: executable file not found in $PATH: unknown
The first image issue could be because you imported the image incorrectly. The docker import
command is the inverse of docker export
which works on container filesystems rather than images with image metadata. Instead you should run docker load
with docker save
to transfer images. If that works correctly, you will see an entrypoint defined in your image and that entrypoint is what docker should try running with the command
value as an argument to the entrypoint:
$ docker image inspect mysql:5.7 --format '{{.Config.Entrypoint}}'
[docker-entrypoint.sh]
The second error looks like a bad export/import of the centos:7 image. If you are using overlay2 you can inspect the image and filesystem layers:
# docker image inspect centos:7 --format '{{.RootFS.Layers}}'
[sha256:77b174a6a187b610e4699546bd973a8d1e77663796e3724318a2a4b24cb07ea0]
# cat /var/lib/docker/image/overlay2/layerdb/sha256/77b174a6a187b610e4699546bd973a8d1e7
7663796e3724318a2a4b24cb07ea0/cache-id
e82a8ede7fba48074c4c41c53db8244002cb6896f0687e1af29d15a411de11c7
# ls -al /var/lib/docker/overlay2/e82a8ede7fba48074c4c41c53db8244002cb6896f0687e1af29d15a411de11c7/
committed diff/ link
root@bmitch-t490:/home/bmitch# ls -al /var/lib/docker/overlay2/e82a8ede7fba48074c4c41c53db8244002cb6896f0687e1af29d15a411de11c7/diff/usr/bin/bash
-rwxr-xr-x 1 root root 964600 Aug 8 2019 /var/lib/docker/overlay2/e82a8ede7fba48074c4c41c53db8244002cb6896f0687e1af29d15a411de11c7/diff/usr/bin/bash
Docker Error response from daemon: OCI runtime create failed container_linux.go:380: starting container process caused
It looks like you're trying to replace the application code in the image with different code using Docker bind mounts. Docker's general model is that a container runs a self-contained image; you shouldn't need to separately install the application code on the host.
In particular, these two volumes:
blocks cause the error you're seeing, and can safely be removed:
services:
react-app:
build: # <-- This block builds an image with the code
context: ./
dockerfile: ./client/Dockerfile
# volumes: # <-- So delete this block
# - ./client:/usr/src/client:ro
# - /usr/src/client/node_modules
node-app:
build:
context: ./
dockerfile: ./server/Dockerfile
# volumes: # <-- And this one
# - ./server:/usr/src/server:ro
# - /usr/src/server/node_modules
Mechanically, the first volumes:
line replaces the image's code with different code from the host, but with a read-only mount. The second volumes:
line then further tries to replace the node_modules
directory with an old copy from an anonymous volume. This will create the node_modules
directory if it doesn't exist yet; but the parent directory is a read-only volume mount, resulting in the error you're seeing.
OCI runtime create failed container_linux.go:370
The OCI message is just part of how Alpine reports an error. But your actual error is in the CMD line.
Your syntax is not correct. Either you remove the []
or add as comma a @jakub pointed out.
https://docs.docker.com/engine/reference/builder/#cmd
Related Topics
How to Read Config Files with Section in Bash Shell
Getting File Create Notifications for Cifs Mount in Linux
How to Access the Base Filename of a File You Are Sourcing in Bash
Xargs Sh -C Skipping the First Argument
/Usr/Bin/Ld: Client: Hidden Symbol '_Dso_Handle'
Loading Executable or Executing a Library
Haskell Ghc Compiling/Linking Error, Not Creating Executable. (Linux)
Explanation of Memcpy Memmove Glibc_2.14/2.2.5
Libpcap - Capture Packets from All Interfaces
What Does the Line '!/Bin/Sh -E' Do
Converting a Pcap Trace to Netflow Format
How to Avoid the Prompts While Using Azcopy on Linux in a Script
Loop Over File Names from 'Find'