zoukankan      html  css  js  c++  java
  • ubuntu系统上安装docker

    ubuntu系统上安装docker

    背景

    阿里云服务器上需要部署项目,所以想简单试一下docker。

    参考

    参考的是菜鸟教程里面的,但是到最后安装不上,也不知道为什么,提示-bash: VERSION_STRING: No such file or directory

    安装教程

    更新包的索引

    sudo apt-get update

    安装apt依赖包,用于通过https来获取仓库

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

    添加Docker的官方GPG秘钥:

    curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
    
    

    验证秘钥

    sudo apt-key fingerprint 0EBFCD88

    这里只输入第一行就行了。

    设置稳定仓库

    sudo add-apt-repository 
       "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ 
      $(lsb_release -cs) 
      stable"
    

    的意思是换行

    安装 Docker Engine-Community

    更新索引

    sudo apt-get update

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

    查看仓库内的可用版本

    **apt-cache** madison docker-ce

    sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
    

    到这里就不能用了。

    可以更换安装方法。

    正确的安装方式

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

    安装成功

  • 相关阅读:
    Element-ui组件--pagination分页
    vue数据请求
    CSS设置背景透明字体不透明
    Sublime Text3的快捷键和插件
    Sublime Text 3 安装Package Control
    想学习一下node.js,重新安装配置了node
    js 上传图片
    js 前端不调接口直接下载图片
    js 获取当前URL信息
    js 常用的正则表达式
  • 原文地址:https://www.cnblogs.com/chenyameng/p/13971257.html
Copyright © 2011-2022 走看看