"python" - Python Docker Image


What is the Python Docker Image, "python"? I wan to use it build a Python application.

✍: FYIcenter.com


The Python Docker Image, "python", is the official Docker image that provides you a Python development environment. You pull and try it.

1. Search for the "python" image.

fyicenter$ docker search python

NAME                       DESCRIPTION                                    STARS  OFFICIAL
python                     Python is an interpreted, interactive, objec…  4184   [OK]
django                     Django is a free web application framework, …  836    [OK]
pypy                       PyPy is a fast, compliant alternative implem…  188    [OK]
kaggle/python              Docker image for Python scripts run on Kaggle  118            
frolvlad/alpine-python3    The smallest Docker image with Python 3.6 (~…  100            
azuresdk/azure-cli-python  For official Azure CLI 2.0 builds, see https…  37             
arm32v7/python             Python is an interpreted, interactive, objec…  37

2. Pull the "python" image.

fyicenter$ docker image pull python

Using default tag: latest
latest: Pulling from library/python
c5e155d5a1d1: Already exists
221d80d00ae9: Already exists
4250b3117dca: Already exists
3b7ca19181b2: Pull complete
425d7b2a5bcc: Pull complete
dc3049ff3f44: Pull complete
472a6afc6332: Pull complete
5f79c90f8d7c: Pull complete
1051ee813012: Pull complete
Digest: sha256:77a9aac6996ee75a8f4ee4e8e2b6fd34465fb542d4bd1979f425081675c28b6c
Status: Downloaded newer image for python:latest

3. Create a container from the image "python" and run the "python" command interactively.

fyicenter$ docker container run --tty --interactive python python

Python 3.7.3 (default, May  8 2019, 05:28:42)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> print("Hello world!")
Hello world!

>>> exit()

4. Check the image.

fyicenter$ docker image list python

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
python              latest              a4cc999cf2aa        10 days ago         929MB

As you can see, we have successfully pulled the "python" image and run it a new container with an interactive "python" session.


Requirements to Python Hello Website Image

Build "sleep" Image from Alpine

Building Docker Image with "docker build"

⇑⇑ Docker Container Platform - Tutorials

2019-02-04, 1043🔥, 0💬