ubuntu安装docker

1.sudo apt-get update

2.sudo apt-get install docker.io

3.更换docker镜像仓库源

vi /etc/docker/daemon.json  {"registry-mirrors": ["https://pbteziiz.mirror.aliyuncs.com"]}

4.重启docker服务

service docker restart

5.从镜像仓库下载镜像ubuntu

docker pull ubuntu

6.创建容器,运行镜像

docker run -ti ubuntu /bin/bash

原文地址:https://www.cnblogs.com/wythend/p/6403960.html