Docker: Error response from daemon: OCI runtime create failed: container_linux.go:296:
Solution 1
Docker is telling you that the command hit an error.
It is trying to run the node
image with the command -w
.
Since -w
is not a command, it throws this error.
This is because you have written node
in a place you probably didn't mean to.
Your command is being interpreted like this:
docker run -p [port_info] -v [volume_info] node [command]
You can rewrite your command like so and it should work fine:
docker run -p 8085:3000 -v /home/joel/workspace/plural_docker_webdev:/var/www -w "/var/www" node npm start
Solution 2
I had the same issue. My problem was that we did not give it enough memory. Went with the recommended minimum of 2GB of memory. turns out other resources were consuming most of it. gave it 4GB, rebooted & it works fine now.
pelican
Updated on January 04, 2022Comments
-
pelican over 2 years
I am trying to run a simple node application with express but I get this error:
Here's my working directory:
I ran the following command to mount my current source code directory to
/var/www
inside the node container and run node npm start to start up the app; but I get the error above and not sure what to do:docker run -p 8085:3000 -v /home/joel/workspace/plural_docker_webdev:/var/www node -w "/var/www" node npm start
And I get this error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"-w\": executable file not found in $PATH": unknown. ERRO[0000] error waiting for container: context canceled