zoukankan      html  css  js  c++  java
  • 虚拟机 之 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

         解决办法:

          更新软件源

  • 相关阅读:
    大搬家--百度之星 (递推)
    Scrambled Polygon--poj2007(极角排序模板)
    Space Ant--poj1696(极角排序)
    A. Link/Cut Tree--cf614A ()
    Ultra-QuickSort--POJ2299(归并排序求逆序数对)
    An Easy Problem?!--
    C. The Two Routes---cf602C(Dij)
    java 中jar的使用
    两种方法解决tomcat的 Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"]
    Ajax(6) Ajax向servlet请求数据库操作 并显示到当前页面 这个未经测试
  • 原文地址:https://www.cnblogs.com/pokerface/p/8037145.html
Copyright © 2011-2022 走看看