Ubuntu 18.04.4 安装docker18.09 (使用阿里云的源)

由于AI_Station 是使用容器构建环境的,而且只提供镜像上传下载功能,不为容易提供网络功能,因此需要在平台上把镜像拉取到本地,并安装一些必备软件然后再打包成镜像上传回去,因此需要在本地构建docker环境,于是如下: 

 ------------------------------------------------------------------------------

安装GPG证书

curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

写入软件源信息

sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

更新

sudo apt-get -y update

安装Docker-CE

安装最新版本:

sudo apt-get -y install docker-ce

或者本文中的安装指定版本:

查找Docker-CE的版本

apt-cache madison docker-ce

标红的第二列为版本号

 安装指定版本:(这里安装的版本为  5:18.09.9~3-0~ubuntu-bionic  )

sudo apt-get -y install docker-ce=5:18.09.9~3-0~ubuntu-bionic

 查看所安装的docker版本:

sudo docker version

---------------------------------------------------------------------------

将平台上常用的镜像拉取到本地(这里使用的是平台的ftp下载)

通过load方法,将镜像加载到本地:

docker load -i ******.tar

sudo docker load -i 14.14.14.100_5000_other_ubuntu18.04-python3.7.5-openssh7.6-jupyterlab1.2.3-inspur_latest.tar

查看本地的镜像:

sudo docker images

 可以看到平台上的三个镜像已经全部导入。

原文地址:https://www.cnblogs.com/devilmaycry812839668/p/13396076.html