Difficulty: Beginner
Estimated Time: 10 minutes

This scenario continues to explore how to build and deploy your applications as a Docker container. The previous scenario covered deploying a static HTML website. This scenario explores how to deploy a Node.js application within a container.

The environment is configured with access to a personal Docker instance, and the code for a default Expressjs application is in the working directory. To view the code use ls and cat <filename> or use the editor.

The machine name Docker is running on is called docker. If you want to access any of the services then use docker instead of localhost or

Based on content by Katacoda.com

This course explored how you can build a Dockerfile for deploying Node.js applications.

Dockerizing Node.js applications

Step 1 of 6

Download Sample

Download a sample Node.js application with the following command:

curl -L http://assets.joinscrapbook.com/scrapbook-node-docker-example.tar.gz > ~/scrapbook-node-docker-example.tar.gz && mkdir -p ~/tutorial && tar -xvzf ~/scrapbook-node-docker-example.tar.gz -C ~/tutorial && rm ~/scrapbook-node-docker-example.tar.gz

The application can be viewed with ls tutorial/ or using the editor above.