首先用 docker pull 命令下载已有镜像
docker pull ubuntu‘’
使用该镜像创建一个容器
docker run -t -i ubuntu /bin/bash
# download the latest ubuntu image
docker pull ubuntu
# Based on this image, run a container using -it
docker run -it --name test ubuntu /bin/bash
# update and install vim
apt-get update; apt-get install -f vim
# backup sources.list
cd /etc/apt; cp sources.list sources.list.bak
vim sources.list
# dd delete all and paste
apt clean ; apt update
# install pip
apt install -f -y python-pip
# change pip source
# upgrade pip and install jupyter
pip install --upgrade pip
mkdir ~/.pip/pip.conf; vim ~/.pip/pip.conf
pip install --upgrade pip
pip install jupyter
# install miniconda
apt install -y wget
wget -q https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh # -q quiet -O save as file name
ali pip mirror
[global]
trusted-host = mirrors.aliyun.com
index-url = http://mirrors.aliyun.com/pypi/simple
docker commit -m="vim" -a="cqz" containerID imageName