在docker中安装Ubuntu,并在该Ubuntu中安装python与pip
1)下载ubuntu镜像docker pull ubuntu2)查看镜像docker images3)运行容器docker run -itd --name ubuntu-test ubuntu4)进入容器sudo docker exec -it ubuntu-test /bin/bash5)更新源apt-get update6)安装命令,可以用ifconfig查看ipapt install net
·
1)下载ubuntu镜像
docker pull ubuntu
2)查看镜像
docker images
3)运行容器
docker run -itd --name ubuntu-test ubuntu
4)进入容器
sudo docker exec -it ubuntu-test /bin/bash
5)更新源
apt-get update
6)安装python
apt-get install python
7)安装pip
apt install curl
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
8)安装其它命令
apt install iputils-ping # ping
apt install net-tools # ifconfig
apt-get install iproute2 iproute2-doc # ip rule
更多推荐
已为社区贡献1条内容
所有评论(0)