Skip to content
loading...

re: Frontend Development with Docker simplified VIEW POST

TOP OF THREAD FULL DISCUSSION
re: docker run -v `pwd`:/app -p 8900:8900 node:12 sh -c "npm install && npm start" In general, even though it might sound rude, but docs.do...

Thank you for covering for me! I only just saw the reply comment. In addition to that you will need -w /app to change the working directory.

For completeness for anyone else reading,

  • -v mounts the volume /app to your current path (pwd gets your current path)
  • -p maps the ports. I would also change this -p localhost:8900:8900 just so it's only accessible from localhost
  • node:12 specifies the container image. Docker hub hosts the iamge
  • sh -c "..." is the command to run on entry
code of conduct - report abuse