• 虚拟机 之 docker使用


    一、安装:

    Ubuntu:

      1.1 从docker官方源安装最新版本:

        sudo apt-get install apt-transport-https

     ActionScript Code 
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    apt-transport-https 
    is already the newest version (1.2.24).
    The following packages were automatically installed 
    and are no longer required:
      linux-headers-
    4.4.0-21 linux-headers-4.4.0-21-generic linux-headers-4.4.0-75 linux-headers-4.4.0-75-generic linux-headers-4.4.0-78
      linux-headers-
    4.4.0-78-generic linux-headers-4.4.0-79 linux-headers-4.4.0-79-generic linux-headers-4.4.0-81 linux-headers-4.4.0-81-generic
      linux-headers-
    4.4.0-83 linux-headers-4.4.0-83-generic linux-image-4.4.0-21-generic linux-image-4.4.0-75-generic linux-image-4.4.0-78-generic
      linux-image-
    4.4.0-79-generic linux-image-4.4.0-81-generic linux-image-4.4.0-83-generic linux-image-extra-4.4.0-21-generic
      linux-image-extra-
    4.4.0-75-generic linux-image-extra-4.4.0-78-generic linux-image-extra-4.4.0-79-generic linux-image-extra-4.4.0-81-generic
      linux-image-extra-
    4.4.0-83-generic
    Use 
    'sudo apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 249 not upgraded.

         sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

     ActionScript Code 
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    Executing: /tmp/tmp.NKp2Vggwce/gpg.1.sh --keyserver
    hkp:
    //keyserver.ubuntu.com:80
    --recv-keys
    36A1D7869245C8950F966E92D8576A8BA88D21E9
    gpg: requesting key A88D21E9 from hkp server keyserver.ubuntu.com
    gpg: key A88D21E9: 
    public key "Docker Release Tool (releasedocker) <docker@dotcloud.com>" imported
    gpg: Total number processed: 
    1
    gpg:               imported: 
    1  (RSA: 1)

        sudo bash -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"

        sudo apt-get update

     ActionScript Code 
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     
    Hit:1 http://archive.ubuntukylin.com:10006/ubuntukylin trusty InRelease
    Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease                                                                    
    Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease
    Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
    Get:5 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
    Ign:6 https://get.docker.io/ubuntu docker InRelease                                                                                                   
    Get:7 https://get.docker.io/ubuntu docker Release [1,525 B]                                                                                           
    Get:8 https://get.docker.io/ubuntu docker Release.gpg [473 B]
    Fetched 206 kB in 15s (13.2 kB/s)
    Reading 
    package lists... Done
    W: https:
    //get.docker.io/ubuntu/dists/docker/Release.gpg: Signature by key 36A1D7869245C8950F966E92D8576A8BA88D21E9 uses weak digest algorithm (SHA1)

        错误:

     ActionScript Code 
    1
    2
    3
    4
    5
    6
     
    liuzw@ubuntu:/home$ sudo apt-get install -y lxc-docker
    Reading 
    package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate 
    package lxc-docker

         解决办法:

          更新软件源

  • 相关阅读:
    case when then else end的使用说明
    达梦数据库 sql 转换
    javax.servlet.jsp.JspException cannot be resolved to a type
    GIT每次操作需要输入密码
    String、toString()、String.valueOf()
    ibatis中的#和$的区别及模糊搜索
    [C#] 弱委托,支持+=和=写法
    python新建一个目录
    BERT词表unused token不连续
    logits mask与label smoothing冲突
  • 原文地址:https://www.cnblogs.com/pokerface/p/8037145.html
Copyright © 2020-2023  润新知