zoukankan      html  css  js  c++  java
  • docker-ce 安装和卸载

    一、按照官网给的安装方法进行Ubuntu16.04 docker-ce 的安装,步骤如下:

    1、由于apt官方库里的docker版本可能比较旧,所以先卸载可能存在的旧版本:

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

    2、更新apt包索引

    sudo apt-get update

    3、安装以下包以使apt可以通过HTTPS使用存储库(repository)

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

    4、添加Docker官方的GPG密钥

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

    5、使用下面的命令来设置stable存储库

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

    6、再更新一下apt包索引

    sudo apt-get update

    7、安装最新版本的Docker CE

    sudo apt-get install -y docker-ce

    8、在生产系统上,可能会需要应该安装一个特定版本的Docker CE,而不是总是使用最新版本

    apt-cache madison docker-ce

    9、安装固定版本18.03.1~ce-0~ubuntu   (从其中随便选择一个版本)

    sudo apt-get install docker-ce=18.03.1~ce-0~ubuntu

    10、验证docker


    (1)查看docker服务是否启动:

    systemctl status docker

    (2)若未启动,则启动docker服务:

    sudo systemctl start docker

    (3)经典的hello world:

    sudo docker run hello-world

    二、卸载docker

    sudo apt-get remove docker
    sudo apt-get remove docker-ce
    sudo apt-get autoremove --purge docker-engine
    sudo rm -rf /var/lib/docker
  • 相关阅读:
    P3478 [POI2008]STA-Station
    P2015 二叉苹果树
    P2014 选课 (树型背包模版)
    求树的每个子树的重心
    求树的直径
    Javascript--防抖与节流
    JavaScript中call和apply的区别
    解决谷歌浏览器“此Flash Player与您的地区不相容,请重新安装Flash”问题(最新版)
    matlab实验代码(总)
    表达式树
  • 原文地址:https://www.cnblogs.com/fuhang/p/10224289.html
Copyright © 2011-2022 走看看