侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

Ubuntu下快速安装社区版Docker

2023-11-10 星期五 / 0 评论 / 0 点赞 / 43 阅读 / 1452 字

进入docker网址https://www.docker.com/点击 Get Docker -> Ubuntu 就可以看到教程(下面是官网搬运过来的 -v-)Setp 1:Set up the re

进入docker网址https://www.docker.com/
点击 Get Docker -> Ubuntu 就可以看到教程(下面是官网搬运过来的 -v-)

  • Setp 1:Set up the repository 将Docker添加到仓库中

Set up the Docker CE repository on Ubuntu. The lsb_release -cs sub-command prints the name of your Ubuntu version, like xenial or trusty.

sudo apt-get -y install /  apt-transport-https /  ca-certificates /  curlcurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -sudo add-apt-repository /       "deb [arch=amd64] https://download.docker.com/linux/ubuntu /       $(lsb_release -cs) /       stable"    sudo apt-get update

ps 其中$(lsb_release -cs) 是 ubuntu的版本号
如果用的是ubuntu16.4 则等同于 以下命令

sudo add-apt-repository /       "deb [arch=amd64] https://download.docker.com/linux/ubuntu /       xenial /       stable"
  • Setp 2 : Get Docker CE 安装Docker社区版

Install the latest version of Docker CE on Ubuntu:

sudo apt-get -y install docker-ce
  • Setp 3 : Test your Docker CE installation 测试你的Docker

Test your installation:

sudo docker run hello-world

广告 广告

评论区