From the course: Docker for Data Engineers

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Using the Python base image

Using the Python base image - Docker Tutorial

From the course: Docker for Data Engineers

Using the Python base image

We built our first image using the Alpine Linux distribution as our base layer. But what if you want to run a Python app within a container? Your base layer needs to have Python installed. If you want your containers to run Python applications, it's common practice to use a Python image as your base layer. Here I am on Docker Hub and I've searched for Python. You'll find that Docker Hub has an official Python image for the different versions of Python that you might want to use, and you can use this as the base layer for your container. Observe that this Python image is a Docker official image. You can see that right next to the name of the image. Let's head over to tags to see what versions of this image are available. Now you can see that an image was recently released and has been tagged using the latest tag. Now, you can choose to use this as the base image within your container, but a production best practice is to explicitly specify the version of the image that you want to use.…

Contents