Difficulty: beginner
Estimated Time: 15 minutes

In this Lab we will learn about Docker Stack.

You've completed your Docker Stack Lab Exercise!

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Advanced Docker Stack

Step 1 of 4

Step 1 - Dockerfile

In this step, we will create Dockerfile. To complete this step, you need to complete following tasks:

Task : Create Dockerfile

To complete this task, you need to create Dockerfile which contains following steps:

  • Build an image starting with the Python 3 image.
  • Set the working directory to /code.
  • Install the Python dependencies (Django and Redis).
  • Copy Django app.py into the path /code in the image.

Task : Build Image

To complete this step, use the docker build command to build the image docker build --tag django-web-app .

Protip

You can use docker images to see a list of the images on the docker host.

Dockerfile
docker-compose.yml