hans

hans

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


官方安装手册地址:

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 update
    sudo 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 update
    sudo apt-get install docker-ce

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

    sudo gpasswd -a username docker
    sudo service docker restart

完事重启电脑即可。

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.