分类

链接

2024 年 10 月
 123456
78910111213
14151617181920
21222324252627
28293031  

近期文章

热门标签

新人福利,免费薅羊毛

现在位置:    首页 > DevOps, Docker > 正文
Amazon Linux 2023 安装Docker和Docker Compose
DevOps, Docker 暂无评论 阅读(3)

看系统和内核

shell

代码解读
复制代码
<span class="code-block-extension-codeLine" data-line-num="1"><span class="hljs-meta prompt_">$ </span><span class="bash"><span class="hljs-built_in">cat</span> /etc/system-release</span></span>
<span class="code-block-extension-codeLine" data-line-num="2">Amazon Linux release 2023 (Amazon Linux)</span>
<span class="code-block-extension-codeLine" data-line-num="3">uname -r</span>
<span class="code-block-extension-codeLine" data-line-num="4">6.1.29-47.49.amzn2023.x86_64</span>

安装Docker

与Amazon Linux 2 不同,它没有附件库,直接从官方存储库安装Docker

shell

代码解读
复制代码
<span class="code-block-extension-codeLine" data-line-num="1"><span class="hljs-meta prompt_">$ </span><span class="bash">dnf install -y docker</span></span>

<span class="code-block-extension-codeLine" data-line-num="3">...</span>

<span class="code-block-extension-codeLine" data-line-num="5">  Verifying        : libnfnetlink-1.0.1-19.amzn2023.0.2.x86_64                                                                                                                                                           1/10 </span>
<span class="code-block-extension-codeLine" data-line-num="6">  Verifying        : docker-20.10.23-1.amzn2023.0.1.x86_64                                                                                                                                                               2/10 </span>
<span class="code-block-extension-codeLine" data-line-num="7">  Verifying        : libcgroup-3.0-1.amzn2023.0.1.x86_64                                                                                                                                                                 3/10 </span>
<span class="code-block-extension-codeLine" data-line-num="8">  Verifying        : containerd-1.6.19-1.amzn2023.0.1.x86_64                                                                                                                                                             4/10 </span>
<span class="code-block-extension-codeLine" data-line-num="9">  Verifying        : libnftnl-1.2.2-2.amzn2023.0.2.x86_64                                                                                                                                                                5/10 </span>
<span class="code-block-extension-codeLine" data-line-num="10">  Verifying        : runc-1.1.4-1.amzn2023.0.1.x86_64                                                                                                                                                                    6/10 </span>
<span class="code-block-extension-codeLine" data-line-num="11">  Verifying        : iptables-nft-1.8.8-3.amzn2023.0.2.x86_64                                                                                                                                                            7/10 </span>
<span class="code-block-extension-codeLine" data-line-num="12">  Verifying        : pigz-2.5-1.amzn2023.0.3.x86_64                                                                                                                                                                      8/10 </span>
<span class="code-block-extension-codeLine" data-line-num="13">  Verifying        : iptables-libs-1.8.8-3.amzn2023.0.2.x86_64                                                                                                                                                           9/10 </span>
<span class="code-block-extension-codeLine" data-line-num="14">  Verifying        : libnetfilter_conntrack-1.0.8-2.amzn2023.0.2.x86_64                                                                                                                                                 10/10 </span>

<span class="code-block-extension-codeLine" data-line-num="16">Installed:</span>
<span class="code-block-extension-codeLine" data-line-num="17">  containerd-1.6.19-1.amzn2023.0.1.x86_64             docker-20.10.23-1.amzn2023.0.1.x86_64      iptables-libs-1.8.8-3.amzn2023.0.2.x86_64  iptables-nft-1.8.8-3.amzn2023.0.2.x86_64  libcgroup-3.0-1.amzn2023.0.1.x86_64 </span>
<span class="code-block-extension-codeLine" data-line-num="18">  libnetfilter_conntrack-1.0.8-2.amzn2023.0.2.x86_64  libnfnetlink-1.0.1-19.amzn2023.0.2.x86_64  libnftnl-1.2.2-2.amzn2023.0.2.x86_64       pigz-2.5-1.amzn2023.0.3.x86_64            runc-1.1.4-1.amzn2023.0.1.x86_64 </span>

启动Docker

启用自动启动并启动Docker

sudo systemctl start docker

sudo systemctl enable docker

 

============ 欢迎各位老板打赏~ ===========

本文版权归Bruce's Blog所有,转载引用请完整注明以下信息:
本文作者:Bruce
本文地址:Amazon Linux 2023 安装Docker和Docker Compose | Bruce's Blog

发表评论

留言无头像?