Docker: Error response from the daemon: OCI runtime error: container_linux.go: 296:

I'm new to docker, just started learning it and I am trying to run a simple node application with an expression, but I get this error:

enter image description here

Here is my working directory:

enter image description here

I ran the following command to set my current source code directory to /var/wwwinside the node container and start node npm to start the application; 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 
+4
source share
1 answer

Docker , . node -w. -w , .

, node , , , .

:

docker run -p [port_info] -v [volume_info] node [command]

, :

docker run -p 8085:3000 -v /home/joel/workspace/plural_docker_webdev:/var/www -w "/var/www" node npm start
+1

Source: https://habr.com/ru/post/1690795/


All Articles