zoukankan      html  css  js  c++  java
  • Ubuntu 创建docker 容器 系列一

    docker 官网安装地址:https://docs.docker.com/install/linux/docker-ce/ubuntu/

    1.Ubuntu的版本要在12.04 LTS 以上,使用uname -a 命令查看Ubuntu的版本号 或者 cat  /proc/version

    2.安装http插件包,支持https 协议源:sudo apt-get install apt-transport-https ca-certificates

    3.安装curl 插件,为了方便执行http 相关命令:sudo apt-get install curl

    4.添加dokcer 官方gpg 密钥

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

    5.验证是安装gpg密钥是否成功:sudo apt-key fingerprint 0EBFCD88

    6.添加仓库

    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"    这里一定要空格隔开,不隔开会sudo apt-get update 报错

    7.更新docker 包

    sudo apt-get update   有可能报错:

      E: Malformed entry 52 in list file /etc/apt/sources.list (Component)
      E: The list of sources could not be read.

    解决:将Ubuntuxenial 空格隔开,若第六步,配置没问题,就不会发生这种情况,文件路径 /etc/apt/sources.list 

    8.安装最新的docker CE

     sudo apt-get install docker-ce docker-ce-cli containerd.io

    若安装不成功则:

    apt-cache madison docker-ce 获取所有版本号
    sudo apt-get install docker-ce="5:18.09.3~3-0~ubuntu-xenial"  docker-ce-cli="5:18.09.3~3-0~ubuntu-xenial"  containerd.io :再根据版本号安装

    若还是未能安装成功,则先去 https://download.docker.com/linux/ubuntu/dists/ 这个地址下载对应操作系统代号下的镜像

    9.测试docker CE 是否安装成功。

    sudo docker run hello-world, 若没有则会主动给出提示

    到此docker 安装完成

     
    
    
  • 相关阅读:
    topsort模板,poj 2585
    CUG2012年暑期ACM训练赛(单人赛)
    第一个QT, "hello linux"
    AOE网络,最长路关键路径的学习
    种类位置信息:geometry
    标准对话框:StandardDialogs
    最近整理的模板
    单调队列的学习
    118 ZOJ Monthly, July 2012
    离散化 + unique + lower_bound的学习,hdu4325
  • 原文地址:https://www.cnblogs.com/blogxiao/p/10554389.html
Copyright © 2011-2022 走看看