Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

ErrorCorner

ErrorCorner Logo ErrorCorner Logo

ErrorCorner Navigation

  • Home
  • Contact Us
  • About Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Contact Us
  • About Us
Home/ Questions/Q 963
Answered
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 4
Kenil Vasani
Asked: December 22, 20202020-12-22T07:08:53+00:00 2020-12-22T07:08:53+00:00

Docker: Error response from daemon: OCI runtime create failed: container_linux.go:296:

  • 4

I am trying to run a simple node application with express but I get this error:

enter image description here

Here’s my working directory:

enter image description here

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
dockerdocker-composedockerfilenode.js
  • 1 1 Answer
  • 335 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    1. Kenil Vasani

      Kenil Vasani

      • 646 Questions
      • 567 Answers
      • 77 Best Answers
      • 26 Points
      View Profile
      Best Answer
      Kenil Vasani
      2020-12-22T07:07:26+00:00Added an answer on December 22, 2020 at 7:07 am

      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
      
      • 5
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask A Question
    • Popular
    • Kenil Vasani

      SyntaxError: invalid syntax to repo init in the AOSP code

      • 5 Answers
    • Kenil Vasani

      runtimeError: package fails to pass a sanity check for numpy ...

      • 3 Answers
    • Kenil Vasani

      xlrd.biffh.XLRDError: Excel xlsx file; not supported

      • 3 Answers
    • Kenil Vasani

      Homebrew fails on MacOS Big Sur

      • 3 Answers
    • Kenil Vasani

      SQLSTATE[HY000]: General error: 1835 Malformed communication packet on LARAVEL

      • 2 Answers

    Explore

    • Most Answered
    • Most Visited
    • Most Voted
    • Random

    © 2020-2021 ErrorCorner. All Rights Reserved
    by ErrorCorner.com