【Linux】【Docker】Ubuntu14.04 安装 Docker CE

来源:互联网 发布:股票统计软件手机 编辑:程序博客网 时间:2024/06/05 06:03

官方安装手册地址:

https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-repository



1. 检查卸载旧版本docker

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

2. 安装一些其他软件

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

3. 添加官方PGP秘钥:

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

4. 添加apt安装配置:

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

5. 安装:

sudo apt-get updatesudo apt-get install docker-ce

6. 使用docker时取消sudo命令:

sudo gpasswd -a username dockersudo service docker restart
完事重启电脑即可。