<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Container on Hxysayhi</title>
    <link>https://hxysayhi.github.io/tags/container/</link>
    <description>Recent content in Container on Hxysayhi</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 26 Jan 2022 23:31:24 +0000</lastBuildDate>
    <atom:link href="https://hxysayhi.github.io/tags/container/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>containerd导入本地镜像的一个小坑</title>
      <link>https://hxysayhi.github.io/posts/0e8b92e6/</link>
      <pubDate>Wed, 26 Jan 2022 23:31:24 +0000</pubDate>
      <guid>https://hxysayhi.github.io/posts/0e8b92e6/</guid>
      <description>&lt;p&gt;containerd 命令行工具为 ctr&lt;/p&gt;&#xA;&lt;p&gt;本地镜像导入命令：&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ctr image import &amp;lt;path/to/image/file&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;注意：当tar包没有tag信息时，导入之后，无报错，errno 为0，但是 通过 &lt;code&gt;ctr images ls&lt;/code&gt; 查看却没有相关的镜像。这种情况，需要添加 &lt;code&gt;--digests=true&lt;/code&gt;  来导入：&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ctr image import --digests&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;true &amp;lt;path/to/images/file&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
