• Ubuntu18.04上安装Docker CE


    建立 REPOSITORY

    1.更新索引包

       更新 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的地址,这样才能获取到最新的软件包

    sudo apt-get update

    2.获取HTTPS支持

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

    3.添加docker公共秘钥(官方地址)

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

     验证此apt-key是否安装成功

    sudo apt-key fingerprint 0EBFCD88

    4.设置版本类型,docker版本包括:stable、edge、test(每季度更新stable版本,每个月更新edge版本)。

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

    修改的文件在:/etc/apt/sources.list

    终端执行时可以看到Ubuntu18.04对应版本为bionic

    安装 DOCKER CE

    1.更新索引包

    sudo apt-get update

    2.安装最新版Docker CE

    sudo apt-get install docker-ce

      或者安装制定版本的Docker CE,生产环境安装docker要指定版本安装,不要安装最新版本。

    apt-cache madison docker-ce

    3.设置开机自启动并启动 Docker-ce(安装成功后默认已设置并启动,可忽略)

    sudo systemctl enable docker
    sudo systemctl start docker

    卸载

    1.卸载docker ce

    sudo apt-get purge docker-ce

    2.删除镜像、容器、卷

    sudo rm -rf /var/lib/docker

    参考文献:https://docs.docker.com/install/linux/docker-ce/ubuntu/#upgrade-docker-ce

  • 相关阅读:
    爬虫-基于scrapy-redis两种形式的分布式爬虫
    爬虫-Scrapy框架(CrawlSpider)
    爬虫-User-Agent和代理池
    爬虫-scrapy框架之递归解析和post请求
    爬虫-scrapy数据的持久化存储
    爬虫-scrapy框架简介和基础应用
    爬虫-移动端数据爬取
    爬虫-图片懒加载技术、selenium和PhantomJS
    爬虫-验证码处理
    爬虫-requests模块
  • 原文地址:https://www.cnblogs.com/wintersoft/p/9904582.html
Copyright © 2020-2023  润新知