Build a Simple Node.js Web Server with Docker

InstructorMark Shust

Share this video with your friends

Send Tweet

Learn how to build a simple Node.js web server with Docker. In this lesson, we'll create a Dockerfile for a simple Node.js script, copy and build it into a Docker image, and start a container to run the web server.

Ben Read
~ 6 years ago

Very useful tutorial. I had trouble gracefully stopping the container (CTRL+C doesn't work).

In that situation this might help: https://forums.docker.com/t/docker-run-cannot-be-killed-with-ctrl-c/13108

J. Matthew
~ 5 years ago

Very useful tutorial. I had trouble gracefully stopping the container (CTRL+C doesn't work).

Thanks for the tip; I had the same problem. The suggested solution of opening another terminal and running docker stop <id> worked for me.

~ 8 months ago

The image doesn't build unfortunately. Something about index.js not being in the context.