ubuntu安装docker容器

1、修改source.list文件(/etc/apt/source.list)增加阿里云的源

deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic stable

2、增加gpg密钥

root@wxj-virtual-machine:/etc/apt# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

3、更新源

root@wxj-virtual-machine:/etc/apt# apt-get update

4、安装docker-ce

root@wxj-virtual-machine:/etc/apt# apt-get install docker-ce

5、启动docker

root@docker:~# /etc/init.d/docker start

6、查看当前docker版本信息

root@docker:~# docker version 

Client:

 Version:           18.09.8

 API version:       1.39

 Go version:        go1.10.8

 Git commit:        0dd43dd87f

 Built:             Wed Jul 17 17:40:56 2019

 OS/Arch:           linux/amd64

 Experimental:      false

 Server: Docker Engine - Community

 Engine:

  Version:          18.09.8

  API version:      1.39 (minimum version 1.12)

  Go version:       go1.10.8

  Git commit:       0dd43dd

  Built:            Wed Jul 17 17:07:25 2019

  OS/Arch:          linux/amd64

  Experimental:     false 

发表评论

登录... 后才能评论