方法一、docker pull python:3.5
查找 Docker Hub 上的 Python 镜像:
默认是最新版本 python:latest,可以通过 Sort by 查看其他版本的 python。
此外,我们还可以用 docker search python 命令来查看可用版本:
runoob@runoob:~/python$ docker search python
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
python Python is an interpreted,... 982 [OK]
kaggle/python Docker image for Python... 33

本文介绍了两种在 Docker 中安装 Python 的方法:通过 `docker pull` 获取官方镜像,或者利用 Dockerfile 自定义构建。详细步骤包括如何拉取特定版本的 Python 镜像,创建 Dockerfile,以及如何运行容器并执行 Python 脚本。
最低0.47元/天 解锁文章
1026

被折叠的 条评论
为什么被折叠?



