Ubuntu 18.04+docker+nvidia-docker+deepo安装及踩坑记录

Ubuntu 18.04安装docker踩坑记录(根据docker官网)1.Update the apt package index:$ sudo apt-get update2.Install packages to allow apt to use a repository over HTTPS:$ sudo apt-get install \apt-transport-ht...
摘要由CSDN通过智能技术生成
Ubuntu 18.04安装docker踩坑记录
(根据docker官网

1.Update the apt package index:
$ sudo apt-get update

2.Install packages to allow apt to use a repository over HTTPS:
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common

3. Add Docker’s o cial GPG key:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
[注]:这里要是不OK的话,就用手机开热点,就显示OK。

Verify that you now have the key with the ngerprint:
$ sudo apt-key fingerprint 0EBFCD88
显示:
pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
sub   rsa4096 2017-02-22 [S]

4.Use the following command to set up the stable repository:
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

[注]:
若在以上的第3步或第4步出现docker官方源安装不上的情况,W:Failed to fetch https://apt.dockerproject.org/repo/dists/ubun
则,
$sudo gedit /etc/apt/sources.list
将docker官方源删掉,换作阿里源,并:
$curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
$sudo add-apt-repository \ 
	"deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \
	$(lsb_release -cs \
	stable)"
若不修改以上三步,则每次apt update就会报错:
Failed to fetch https://apt.dockerproject.org/repo/dists/ubun

5.Update the apt package index:
$ sudo apt-get update
[注]:这里如果一直很慢的话,换手机开热点就好了

6.Install the latest version of Docker CE, or go to the next step to install a specic version:
$ sudo apt-get install docker-ce
[注]:这里要是出现:
update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode
docker.service is a disabled or a static unit, not starting it.
则很有可能运行下一步的时候报错,若不出现这两行就没关系。

7.Verify that Docker CE is installed correctly by running the hello-world image:
$ sudo docker run hello-world
这里若是出现:
Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.</
  • 3
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值