Difficulty: beginner
Estimated Time: 20 minutes

In this workshop you will learn how to use docker to containerize a Node.js application.

Setup - Create a Docker Hub account

If you have a Docker Hub account, you can skip this step.

Go to https://hub.docker.com and create an account.

If you need to verify your account with your email address.

Login to your hub.docker.com account.

This scenario took a Node.js application and created a Docker image for it. We then deployed the Docker image and uploaded it to Docker Hub.

Docker Workshop

Step 1 of 2

Step 1 - Deploying Node.js

In this step, you will clone, deploy, and run a Node.js application.

Clone the application from its repository

git clone https://github.com/chukmunnlee/acd_docker_workshop.git

Change into the repository directory

cd acd_docker_workshop

Install the required dependencies

npm install

Run the Node application

node main.js

The application will be listening on port 3000. You can visit it by clicking on this link: https://[[CLIENT_SUBDOMAIN]]-3000-[[KATACODA_HOST]].environments.katacoda.com/

Stop the Node application

In the terminal window, do Ctrl+C to stop the node process. Next, we will walk through how to run the same application in a container.