zoukankan      html  css  js  c++  java
  • 在Ubuntu上安装Docker

    安装Docker

    国内方式

    国内的网络环境众所周知,所以推荐使用镜像站进行安装

    sudo apt-get update && sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common && curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - && sudo apt-key fingerprint 0EBFCD88 && sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" && sudo apt-get update && sudo apt-get -y install docker-ce docker-ce-cli containerd.io && sudo docker --version
    

    Docker官网方式

    有时候国内镜像同步不及时,可能会安装失败,此时只能通过官网来进行安装

    sudo apt-get update && sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && sudo apt-get update && sudo apt-get -y install docker-ce docker-ce-cli containerd.io && sudo docker --version
    

    安装校验

    root@iZbp12adskpuoxodbkqzjfZ:$ docker version
    Client:
    Version: 17.03.0-ce
    API version: 1.26
    Go version: go1.7.5
    Git commit: 3a232c8
    Built: Tue Feb 28 07:52:04 2017
    OS/Arch: linux/amd64
    
    Server:
    Version: 17.03.0-ce
    API version: 1.26 (minimum version 1.12)
    Go version: go1.7.5
    Git commit: 3a232c8
    Built: Tue Feb 28 07:52:04 2017
    OS/Arch: linux/amd64
    Experimental: false
    

    Docker-compose安装

    ## 自行修改version为最新版本的docker-compose
    sudo curl -L "https://github.com/docker/compose/releases/download/${version}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose && docker-compose --version
    

    参考资料

  • 相关阅读:
    深入浅出java IO模型
    MySQL 最基本的SQL语法/语句
    mysql sql常用语句大全
    Mysql数据库常用操作语句大全
    python3.6.1 安装PyQt5,以及配置QTDesigner,PyUIC
    Python之文件操作:os模块
    Python之OS模块函数
    Python OS模块
    Shell编程基础
    mysqldump恢复
  • 原文地址:https://www.cnblogs.com/gcdd1993/p/14673172.html
Copyright © 2011-2022 走看看