vmware安装dockers

 

软件环境:

windows:7

vmware:14.1.1 build-7528167

ubuntu镜像:ubuntu-16.04.5-desktop-amd64.iso

docker:18.06.1-ce

1、从地址http://mirror.pnl.gov/releases/xenial/  下载镜像。

2、vmware中安装ubuntu镜像。

3、设置镜像加速器。

# 备份原文件
mv /etc/apt/sources.list /etc/apt/sources.list.bak

# 修改为阿里云的镜像源
cat > /etc/apt/sources.list << END
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
END

# 更新源列表信息
apt-get update

4、安装docker

卸载老版本

sudo apt-get remove docker docker-engine docker.io

更新源

 sudo apt-get update

允许apt在https之上使用仓库

apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

添加docker官方的GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

检查你有这个key

apt-key fingerprint 0EBFCD88

创建一个稳定的仓库

add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

更新apt索引

apt-get update

安装最新版本的docker

apt-get install docker-ce

列出仓库中你可用的版本

apt-cache madison docker-ce

可以安装制定的版本

apt-get install docker-ce=<VERSION>

坚持是否安装成功!

docker run hello-world

如图示则安装成功则安装成功

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值