Ubuntu上的安装

1. 更新系统里的所有能更新的软件,更新apt软件包索引并安装软件包,以允许apt通过HTTPS使用存储库 

lizhichao@chaochao:~$ sudo apt-get update
lizhichao@chaochao:~$ sudo apt-get install \
>     apt-transport-https \
>     ca-certificates \
>     curl \
>     gnupg \
>     lsb-release

2. 添加Docker的官方GPG密钥

lizhichao@chaochao:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

3、lizhichao@chaochao:~$ 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

4. 更新apt软件包索引,并安装最新版本的Docker Engine和containerd,或转至下一步安装特定版本

lizhichao@chaochao:~$ sudo apt-get update
lizhichao@chaochao:~$  sudo apt-get install docker-ce docker-ce-cli containerd.io

5. 要安装特定版本的Docker Engine,然后试运行

lizhichao@chaochao:~$ systemctl start docker
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'docker.service'.
Authenticating as: repchaochao (lizhichao)
Password: 
==== AUTHENTICATION COMPLETE ===
lizhichao@chaochao:~$ sudo docker run hello-world
 

文章链接: https://www.mfisp.com/17671.html

文章标题:Ubuntu上的安装

文章版权:梦飞科技所发布的内容,部分为原创文章,转载请注明来源,网络转载文章如有侵权请联系我们!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
建站教程投稿分享

docker的常见文件

2023-2-28 17:02:41

建站教程投稿分享

Ubuntu上的安装

2023-3-1 16:31:48

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
客户经理
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索

梦飞科技 - 最新云主机促销服务器租用优惠