Solution

The solution to the first exercise

We'll cover the following...

Before looking at the solution, I want you to try the exercise yourself. If you are able to solve the exercise, verify your answer with the solution. This solution is a set of suggested commands. It’s not necessary that you follow the exact steps to get the desired output.

By any chance, if you are not able to solve the exercise, please go through the lessons one more time and try again. The exercise only tests what you have learned in this section.

Let’s go through the commands to get the solution.

1. We have to pull a Python 3.8 image.

Python is the base image and 3.8 is the version. There are different versions of Python 3.8 images such as alpine and rc-buster. You can pull any of that by looking at the exact name on Docker Hub. For this solution, I’ll use python:3.8 only.

docker pull python:3.8

root@educative:/# docker pull python:3.8
3.8: Pulling from
...