1.查询镜像
https://hub.docker.com/search?operating_system=linux&source=verified&type=image
2.拉取镜像
#拉取镜像(最新镜像)
docker pull python
#查询镜像
docker images
#运行镜像 entrypoint bash 不进入后台运行
docker run -it --entrypoint bash python
3.测试是否按照成功
[root@bogon redis]# docker run -it --entrypoint bash python:latest
root@aef564097eef:/# uname -a
Linux aef564097eef 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 GNU/Linux
root@aef564097eef:/# python
Python 3.7.4 (default, Jul 13 2019, 14:04:11)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print ('222')
222
>>>
root@aef564097eef:/#
进入python后按Ctrl+D退出,exit再次退出