Difficulty: Beginner
Estimated Time: 1 hours

Understand How Docker Works in 20 Minutes

Learn to use Docker to build a Flask API server Docker image and run it as a Docker instance.

In 20 minutes, you'll use Docker to build, run, monitor, destroy a Flask API server Docker instance.

Let's get started!


You've learned Basic Docker by completing the following steps:

  • Build the Docker image with Dockerfile
  • Run the Docker Image as an Docker instance
  • Push the Docker Image to Docker Hub
  • Logging & Remove Docker Instances & Docker Images

If you would like to dive in deeper please take a look at the Docker documentation at link.

Continue your education by reading more about Kubernetes at KubeOps Skills Page

Docker Basic

Step 1 of 4

Build the Flask API Server into Docker image

When you started this tutorial the Docker was already started for you. The initialization process takes a few second as it retrieves any necessary dependencies and few data into current directory.

List all files from current directory in your terminal


Run this command to build a images named docker-demo

docker build -t docker-demo .

Display the Docker image named docker-demo

docker images | grep docker-demo

Now that Docker image is ready. Please continue to the next step.