{"id":32717,"date":"2023-01-18T10:36:06","date_gmt":"2023-03-25T20:24:35","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/"},"modified":"2024-01-15T07:27:04","modified_gmt":"2024-01-14T23:27:04","slug":"%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/","title":{"rendered":"\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b"},"content":{"rendered":"<pre class=\"post-pre\"><code><span class=\"nb\">cat <\/span>multiarch image built <span class=\"o\">&gt;<\/span> index.html\r\n<span class=\"nb\">chmod <\/span>644 index.html\r\n<span class=\"nb\">cat<\/span> <span class=\"o\">&lt;&lt;<\/span><span class=\"sh\">\"<\/span><span class=\"no\">EOF<\/span><span class=\"sh\">\"&gt; Dockerfile\r\nFROM docker.io\/library\/nginx:latest\r\nCOPY .\/index.html \/usr\/share\/nginx\/html\r\n<\/span><span class=\"no\">EOF\r\n\r\n<\/span>buildah bud <span class=\"nt\">--arch<\/span> amd64 <span class=\"nt\">-t<\/span> tmp\/nginx-amd64:latest\r\nbuildah bud <span class=\"nt\">--arch<\/span> arm <span class=\"nt\">--variant<\/span> v5 <span class=\"nt\">-t<\/span> tmp\/nginx-arm-v5:latest\r\nbuildah bud <span class=\"nt\">--arch<\/span> arm <span class=\"nt\">--variant<\/span> v7 <span class=\"nt\">-t<\/span> tmp\/nginx-arm-v7:latest\r\nbuildah bud <span class=\"nt\">--arch<\/span> arm64 <span class=\"nt\">--variant<\/span> v8 <span class=\"nt\">-t<\/span> tmp\/nginx-arm64-v8:latest\r\n\r\nbuildah manifest create kahiro\/nginx-multiarch:latest\r\nbuildah manifest add <span class=\"nt\">--os<\/span><span class=\"o\">=<\/span>linux <span class=\"nt\">--arch<\/span><span class=\"o\">=<\/span>amd64 kahiro\/nginx-multiarch:latest tmp\/nginx-amd64:latest\r\nbuildah manifest add <span class=\"nt\">--os<\/span><span class=\"o\">=<\/span>linux <span class=\"nt\">--arch<\/span><span class=\"o\">=<\/span>arm <span class=\"nt\">--variant<\/span> v5 kahiro\/nginx-multiarch:latest tmp\/nginx-arm-v5:latest\r\nbuildah manifest add <span class=\"nt\">--os<\/span><span class=\"o\">=<\/span>linux <span class=\"nt\">--arch<\/span><span class=\"o\">=<\/span>arm <span class=\"nt\">--variant<\/span> v7 kahiro\/nginx-multiarch:latest tmp\/nginx-arm-v7:latest\r\nbuildah manifest add <span class=\"nt\">--os<\/span><span class=\"o\">=<\/span>linux <span class=\"nt\">--arch<\/span><span class=\"o\">=<\/span>arm64 <span class=\"nt\">--variant<\/span> v8 kahiro\/nginx-multiarch:latest tmp\/nginx-arm64-v8:latest\r\n\r\nbuildah manifest inspect localhost\/kahiro\/nginx-multiarch:latest\r\n\r\nbuildah login docker.io\r\n\r\nbuildah manifest push <span class=\"nt\">--all<\/span> kahiro\/nginx-multiarch:latest docker:\/\/kahiro\/nginx-multiarch:latest\r\n<\/code><\/pre>\n<h2>\u8bf7\u53c2\u8003\u3002<\/h2>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cat multiarch image built &gt; index.html chmod 644 ind [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32717","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b\" \/>\n<meta property=\"og:description\" content=\"cat multiarch image built &gt; index.html chmod 644 ind [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-25T20:24:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-14T23:27:04+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/\",\"name\":\"\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-03-25T20:24:35+00:00\",\"dateModified\":\"2024-01-14T23:27:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b","og_description":"cat multiarch image built &gt; index.html chmod 644 ind [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-03-25T20:24:35+00:00","article_modified_time":"2024-01-14T23:27:04+00:00","author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/","name":"\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-03-25T20:24:35+00:00","dateModified":"2024-01-14T23:27:04+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528buildah\u521b\u5efa\u591a\u5e73\u53f0\u955c\u50cf\u7684\u793a\u4f8b"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8buildah%e5%88%9b%e5%bb%ba%e5%a4%9a%e5%b9%b3%e5%8f%b0%e9%95%9c%e5%83%8f%e7%9a%84%e7%a4%ba%e4%be%8b%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=32717"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32717\/revisions"}],"predecessor-version":[{"id":57359,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/32717\/revisions\/57359"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=32717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=32717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=32717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}