In this scenario you will learn about the basics on how to build an app using containers. You will create a Dockerfile and build a container based on it. Then you'll learn how to run a container based off of the container image you build and finally how to push it to a container registry.
Congrats!!
You've master the first level of containerized apps building. You're a container Padawan now. Time for the next scenario where we'll have a look at how to deploy the app in Kubernetes.

Steps
Container Basics
Understanding the Dockerfile
A Dockerfile describes how the container is supposed to be constructed. It's a bit like setting up software on a machine: you specify the steps to copy stuff around, install a package or maybe even build stuff from source. Let's have a look at a simple example, a Node.js app:
FROM mhart/alpine-node:8 MAINTAINER Michael HausenblasWORKDIR /app COPY dok-example-us/stock-con/ . RUN npm install express && \ npm install USER nobody:nobody CMD ["node", "service.js"]
Now, paste above content—see the copy icon in the upper-right corner of above block—and it will be automatically saved in a file called (surprise!) Dockerfile
in the current directory.
You’ll love Katacoda

Guided Path
Knowing what you need to know is the hardest part. Our guided pathways help build your knowledge around real-world scenarios.

Learn By Doing
The best way to learn is by doing. All our tutorials are interactive with pre-configured live environments ready for you to use.

Stay up-to-date
It's a competitive industry. Your skills need to keep up with the latest approaches. Katacoda keeps your skills up-to-date.
You’ll love Katacoda

Guided Path
Knowing what you need to know is the hardest part. Our guided pathways help build your knowledge around real-world scenarios.

Learn By Doing
The best way to learn is by doing. All our tutorials are interactive with pre-configured live environments ready for you to use.

Stay up-to-date
It's a competitive industry. Your skills need to keep up with the latest approaches. Katacoda keeps your skills up-to-date.