Dockerizing a Node.js Application

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

### Dockerizing a Node.js Application

Welcome back, and great job on migrating the SpaceBones website from NGINX to Apache! President Squawk is very impressed with your skill, and now has another task lined up. As you probably noticed from the current national website, SpaceBones is not only in need of treats, but also in need of a bit of technological advancement.

The Radar Board (The official SpaceBones government tech team) has requested your assistance with developing a Node.js web application that can be used for launching a new and improved SpaceBones webspace.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Github Repository Clone Locally

Student should clone the content-dockerquest-spacebones github repo into the cloud_user home directory.

git clone https://github.com/linuxacademy/content-dockerquest-spacebones
Create Custom Dockerfile for Image Build

Student should create a new Dockerfile under ~/content-dockerquest-spacebones/nodejs-app directory.

touch ~/content-dockerquest-spacebones/nodejs-app/Dockerfile
Successful Creation of ‘baconator’ Image on Local System

Student should use contents of ~/content-dockerquest-spacebones/nodejs-app to create a new Docker image named baconator:dev

build -t baconator:dev .

Additional Resources

The Radar Board (The official SpaceBones government tech team) have requested your assistance with developing a Node.js web application that can be used for launching a new and improved SpaceBones webspace. They have provided all of the basic files in the content-dockerquest-spacebones Github. Using the example Dockerfile included in activity instructions, use Docker to build a new Node.js app image using the files under the content-dockerquest-spacebones/nodejs-app subdirectory, named baconator. Be sure to tag the image as dev. Good luck!

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!