{"id":378037,"date":"2024-06-04T21:00:20","date_gmt":"2024-06-04T21:00:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=378037"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-04T21:00:20","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=378037","title":{"rendered":"<span>\u0428\u0438\u0444\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u043b\u0438 \u041a\u0430\u043a \u043e\u0431\u043e\u0439\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u0435\u0441\u0442\u0440\u0430\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438\u043b\u0438 \u0447\u0442\u043e\u0431\u044b \u0432 \u0432\u0430\u0448\u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u043a\u043e\u043f\u0430\u043b\u0438\u0441\u044c \u0432\u0441\u0435 \u043f\u043e\u0434\u0440\u044f\u0434, \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0430\u043b\u044c\u0448\u0435&#8230;<\/h2>\n<p>\u0412 <a href=\"https:\/\/hub.docker.com\/\" rel=\"noopener noreferrer nofollow\">Docker Hub<\/a> \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0435\u0441\u0442\u0440\u0430\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c, \u0438 \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a.<\/p>\n<p>TL;DR: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b.<\/p>\n<p>\u0412 <a href=\"https:\/\/podman.io\/\" rel=\"noopener noreferrer nofollow\">Podman<\/a> \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u0434\u0435\u043b\u0430\u044f \u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0437\u044b \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c \u043a\u043b\u044e\u0447 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u043e\u043b\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c!<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/podman.io\/docs\/installation\" rel=\"noopener noreferrer nofollow\">Podman<\/a>. \u042d\u0442\u043e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 <a href=\"https:\/\/www.docker.com\/\" rel=\"noopener noreferrer nofollow\">Docker<\/a> \u0438, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0431\u043e\u043b\u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u043c\u0435\u0442\u044c \u0432 \u0441\u0432\u043e\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c &#8212; \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0441\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0433\u043e \u0436\u0435 <code>Docker<\/code>. <code>Podman<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0435\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 <code>Docker<\/code> \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0442\u0430\u043a \u0438 <a href=\"https:\/\/www.ansible.com\/\" rel=\"noopener noreferrer nofollow\">Ansible<\/a> \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 <code>Ansible<\/code> \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f <a href=\"https:\/\/github.com\/containers\/ansible-podman-collections\" rel=\"noopener noreferrer nofollow\">Ansible Podman<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0448\u0438\u0440\u043e\u0447\u0430\u0439\u0448\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0433\u0438\u0431\u043a\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 &#8212; \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438, \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438, \u0442\u043e\u043c\u0430\u043c\u0438, \u043f\u043e\u0434\u0430\u043c\u0438, \u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438, \u0441\u0435\u043a\u0440\u0435\u0442\u0430\u043c\u0438, \u0440\u0435\u0435\u0441\u0442\u0440\u0430\u043c\u0438 \u0438 \u043c\u043d\u043e\u0433\u0438\u043c \u0434\u0440\u0443\u0433\u0438\u043c. \u041e\u043d\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 <code>Ansible<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u043e\u0442\u0442\u0443\u0434\u0430, \u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u0435\u0439\u0448\u0438\u043c\u0438, \u0438 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0435 \u0438\u0437 <a href=\"https:\/\/galaxy.ansible.com\/ui\/repo\/published\/containers\/podman\/\" rel=\"noopener noreferrer nofollow\">Ansible Galaxy<\/a>:<\/p>\n<pre><code class=\"bash\">ansible-galaxy collection install containers.podman<\/code><\/pre>\n<p>\u0438\u043b\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u0438 \u0441\u0432\u0435\u0436\u0435\u0435, \u0432\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u0438\u0437 <a href=\"https:\/\/github.com\/containers\/ansible-podman-collections\" rel=\"noopener noreferrer nofollow\">\u043c\u0430\u0441\u0442\u0435\u0440\u0430<\/a>:<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/containers\/ansible-podman-collections cd ansible-podman-collections ansible-galaxy collection install --force .<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b!<\/p>\n<h4>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h4>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0437\u0443\u0447\u0438\u043c <a href=\"https:\/\/docs.podman.io\/en\/latest\/markdown\/podman-push.1.html#encryption-key-key\" rel=\"noopener noreferrer nofollow\">\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0439 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a>. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u0435\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u0435\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0438\u043b\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a <a href=\"https:\/\/www.openssl.org\/\" rel=\"noopener noreferrer nofollow\">OpenSSL<\/a>:<\/p>\n<pre><code class=\"bash\">mkdir -p keys openssl genrsa -out .\/keys\/container_private.pem 2048 &amp;&amp; \\ openssl rsa -in .\/keys\/container_private.pem -pubout -out .\/keys\/container_public.pem<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <code>openssl<\/code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/hub.docker.com\/_\/nginx\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 nginx<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432:<\/p>\n<pre><code class=\"bash\">docker run -it -v $PWD\/keys:\/data:z docker.io\/library\/nginx sh -c \"\\ openssl genrsa -out \/data\/container_private.pem 2048 &amp;&amp; \\ openssl rsa -in \/data\/container_private.pem -pubout -out \/data\/container_public.pem\"<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <code>podman<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>docker<\/code>:<\/p>\n<pre><code class=\"bash\">podman run -it -v $PWD\/keys:\/data:z docker.io\/library\/nginx sh -c \"\\ openssl genrsa -out \/data\/container_private.pem 2048 &amp;&amp; \\ openssl rsa -in \/data\/container_private.pem -pubout -out \/data\/container_public.pem\"<\/code><\/pre>\n<p>\u0412 <code>Ansible<\/code> \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">- name: Generate SSL keys   containers.podman.podman_container:     name: temporary     state: started     image: docker.io\/library\/nginx     rm: true     volumes:       - \/tmp\/keys:\/data:z     command:       - bash       - -c       - >-         openssl genrsa -out \/data\/container_private.pem 2048 &amp;&amp;         openssl rsa -in \/data\/container_private.pem -pubout -out \/data\/container_public.pem <\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <code>\/tmp\/keys<\/code>, \u0438\u043b\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0442\u044c.<\/p>\n<h4>\u0421\u0431\u043e\u0440\u043a\u0430 \u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h4>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<br \/>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 <code>Dockerfile<\/code>:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF> Dockerfile FROM docker.io\/library\/nginx COPY index.html \/usr\/share\/nginx\/html\/index.html EOF  echo \"test passed\" > index.html podman build . -t docker.io\/sshnaidm\/something:open<\/code><\/pre>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>Podman<\/code> \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u0432 \u0440\u0435\u0435\u0441\u0442\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <code>Podman<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 podman \u0438 docker \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435:<\/p>\n<pre><code class=\"bash\">docker save docker.io\/sshnaidm\/something:open | podman load # \u0438\u043b\u0438 \u0442\u0430\u043a podman image push docker.io\/sshnaidm\/something:close docker-daemon:docker.io\/sshnaidm\/something:closed<\/code><\/pre>\n<p>\u0412 Ansible \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435, \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0438 \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u0435 \u043e\u0431\u0440\u0430\u0437 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code class=\"yaml\">- name: Create Dockerfile   copy:     content: |       FROM docker.io\/library\/nginx       COPY index.html \/usr\/share\/nginx\/html\/index.html     dest: \"{{ playbook_dir }}\/Dockerfile\"  - name: Create index.html   copy:     content: \"&lt;h1>test passed!&lt;\/h1>\"     dest: \"{{ playbook_dir }}\/index.html\"  - name: Build and push the image   containers.podman.podman_image:     name: docker.io\/sshnaidm\/something     tag: closed     path: \"{{ playbook_dir }}\"     state: build     build:       file: \"{{ playbook_dir }}\/Dockerfile\"     push: true     push_args:       dest: docker.io\/sshnaidm\/something:closed       extra_args: --encryption-key jwe:\/absolute\/path\/to\/keys\/container_public.pem <\/code><\/pre>\n<h4>\u0422\u0435\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0441 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/h4>\n<p>\u0422\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>podman<\/code> \u0441 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>JWE<\/code>:<\/p>\n<pre><code class=\"bash\">cd keys\/ podman tag docker.io\/sshnaidm\/something:open docker.io\/sshnaidm\/something:closed podman push --encryption-key jwe:container_public.pem docker.io\/sshnaidm\/something:closed<\/code><\/pre>\n<p>\u041c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u043d\u0430\u0448 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0432 Docker Hub. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>docker<\/code> \u0438\u043b\u0438 <code>podman<\/code>:<\/p>\n<pre><code class=\"bash\">$ podman pull docker.io\/sshnaidm\/something:closed Trying to pull docker.io\/sshnaidm\/something:closed... Getting image source signatures Copying blob 37745a742023 [--------------------------------------] 0.0b \/ 1.4KiB | 0.0 b\/s Copying blob 37745a742023 done   |  [skipped...] Error: writing blob: adding layer with blob \"sha256:69458e593f618c768281ca90b8ed5eb78df30df39902d948f894fd8c7e80906f\": processing tar file(archive\/tar: invalid tar header): exit status 1 <\/code><\/pre>\n<p>\u041d\u0435-\u0430, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \ud83d\ude42<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>docker<\/code>:<\/p>\n<pre><code class=\"bash\">$ docker pull docker.io\/sshnaidm\/something:closed closed: Pulling from sshnaidm\/something 69458e593f61: Extracting [==================================================>]  32.74MB\/32.74MB 1a1e276c1a3b: Download complete  [skipped...] failed to register layer: archive\/tar: invalid tar header <\/code><\/pre>\n<p>\u041d\u0435-\u0430, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \ud83d\ude42<\/p>\n<p>\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0431\u0435\u0437 \u043a\u043b\u044e\u0447\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u044f \u043a\u043b\u044e\u0447 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e, \u0447\u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438!<\/p>\n<h4>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430<\/h4>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437:<\/p>\n<pre><code class=\"bash\">cd keys\/ podman pull --decryption-key container_private.pem docker.io\/sshnaidm\/something:closed # Load it to Docker if you can't use Podman: podman save docker.io\/sshnaidm\/something:closed | docker load docker run -d --name webserver -p 8888:80 docker.io\/sshnaidm\/something:closed curl localhost:8888 $ test passed <\/code><\/pre>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Ansible \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0441\u043a\u0435:<\/p>\n<pre><code class=\"yaml\">- name: Run container   containers.podman.podman_container:     name: webserver     image: docker.io\/sshnaidm\/something:closed     state: started     decryption_key: \/full\/path\/to\/keys\/container_private.pem     publish:       - 8888:80 <\/code><\/pre>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446:<\/p>\n<pre><code class=\"bash\">curl localhost:8888 $ test passed <\/code><\/pre>\n<h4>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 Bash-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 Ansible Playbook<\/h4>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b <code>bash<\/code> \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043b\u0435\u0439\u0431\u0443\u043a Ansible \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 \u0438\u0437 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0435\u0441\u0442\u0440\u0430, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d \u0431\u044b\u043b \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c:<\/p>\n<p>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043e\u0431\u0440\u0430\u0437, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code class=\"bash\"># On client, build image, generate keys, and push encrypted openssl genrsa -out container_private.pem 2048 openssl rsa -in container_private.pem -pubout -out .\/keys\/container_public.pem  cat &lt;&lt;EOF> Dockerfile FROM docker.io\/library\/nginx COPY index.html \/usr\/share\/nginx\/html\/index.html EOF  echo \"test passed\" > index.html  podman build . -t docker.io\/sshnaidm\/something:production podman push --encryption-key jwe:container_public.pem docker.io\/sshnaidm\/something:production <\/code><\/pre>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b container_private.pem \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0442\u0430\u043c:<\/p>\n<pre><code class=\"bash\">podman pull --decryption-key container_private.pem docker.io\/sshnaidm\/something:production # In case of Docker: podman save docker.io\/sshnaidm\/something:production | docker load docker run -d --name webserver -p 8888:80 docker.io\/sshnaidm\/something:production # In case of Podman: podman run -d --name webserver -p 8888:80 docker.io\/sshnaidm\/something:production <\/code><\/pre>\n<p>\u0418\u043b\u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043e\u0434\u043d\u0438\u043c Ansible \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">- hosts: client   tasks:      - name: Generate SSL keys       containers.podman.podman_container:         name: temporary         state: started         image: docker.io\/library\/nginx         rm: true         volumes:           - \/tmp\/keys:\/data:z         command:           - bash           - -c           - >-             openssl genrsa -out   \/data\/container_private.pem 2048 &amp;&amp;             openssl rsa -in \/data\/container_private.pem -pubout -out \/data\/container_public.pem      - name: Create Dockerfile       copy:         content: |           FROM docker.io\/library\/nginx           COPY index.html \/usr\/share\/nginx\/html\/index.html         dest: \"{{ playbook_dir }}\/Dockerfile\"      - name: Create index.html       copy:         content: \"&lt;h1>test passed!&lt;\/h1>\"         dest: \"{{ playbook_dir }}\/index.html\"      - name: Build and push image       containers.podman.podman_image:         name: docker.io\/sshnaidm\/something         tag: production         path: \"{{ playbook_dir }}\"         state: build         build:           file: \"{{ playbook_dir }}\/Dockerfile\"         push: true         push_args:           dest: docker.io\/sshnaidm\/something:production           extra_args: --encryption-key jwe:\/absolute\/path\/to\/keys\/container_public.pem  - hosts: server   tasks:      - name: Distribute keys       copy:         src: \/full\/path\/to\/keys\/container_private.pem         dest: \/full\/path\/to\/keys\/container_private.pem      - name: Run container with Podman       containers.podman.podman_container:         name: webserver         image: docker.io\/sshnaidm\/something:production         state: started         decryption_key: \/full\/path\/to\/keys\/container_private.pem         publish:           - 8888:80 <\/code><\/pre>\n<p>\u0421\u044d\u043a\u043e\u043d\u043e\u043c\u044c\u0442\u0435 \u043d\u0430 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 \u0438 \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441\u0432\u043e\u0438 \u043e\u0431\u0440\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u043c\u0438!<\/p>\n<p>\u041f.\u0421. \u041a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043f\u0438\u0441\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u043a\u0435\u0440\u0445\u0430\u0431 \u0431\u044b\u043b \u0435\u0449\u0451 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u043e\u043a\u0443\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0442\u0430\u043a\u0438 \u043d\u0430 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u0440\u0435\u0435\u0441\u0442\u0440\u0430\u043c\u0438 \u0438 \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/819511\/\"> https:\/\/habr.com\/ru\/articles\/819511\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438\u043b\u0438 \u0447\u0442\u043e\u0431\u044b \u0432 \u0432\u0430\u0448\u0438\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u043a\u043e\u043f\u0430\u043b\u0438\u0441\u044c \u0432\u0441\u0435 \u043f\u043e\u0434\u0440\u044f\u0434, \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0430\u043b\u044c\u0448\u0435&#8230;<\/h2>\n<p>\u0412 <a href=\"https:\/\/hub.docker.com\/\" rel=\"noopener noreferrer nofollow\">Docker Hub<\/a> \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0435\u0441\u0442\u0440\u0430\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c, \u0438 \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a.<\/p>\n<p>TL;DR: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b.<\/p>\n<p>\u0412 <a href=\"https:\/\/podman.io\/\" rel=\"noopener noreferrer nofollow\">Podman<\/a> \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u0434\u0435\u043b\u0430\u044f \u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0437\u044b \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c \u043a\u043b\u044e\u0447 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u043e\u043b\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c!<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/podman.io\/docs\/installation\" rel=\"noopener noreferrer nofollow\">Podman<\/a>. \u042d\u0442\u043e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 <a href=\"https:\/\/www.docker.com\/\" rel=\"noopener noreferrer nofollow\">Docker<\/a> \u0438, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0431\u043e\u043b\u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u043c\u0435\u0442\u044c \u0432 \u0441\u0432\u043e\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c &#8212; \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0441\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0433\u043e \u0436\u0435 <code>Docker<\/code>. <code>Podman<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0435\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 <code>Docker<\/code> \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0442\u0430\u043a \u0438 <a href=\"https:\/\/www.ansible.com\/\" rel=\"noopener noreferrer nofollow\">Ansible<\/a> \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 <code>Ansible<\/code> \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f <a href=\"https:\/\/github.com\/containers\/ansible-podman-collections\" rel=\"noopener noreferrer nofollow\">Ansible Podman<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0448\u0438\u0440\u043e\u0447\u0430\u0439\u0448\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0433\u0438\u0431\u043a\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 &#8212; \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438, \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438, \u0442\u043e\u043c\u0430\u043c\u0438, \u043f\u043e\u0434\u0430\u043c\u0438, \u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438, \u0441\u0435\u043a\u0440\u0435\u0442\u0430\u043c\u0438, \u0440\u0435\u0435\u0441\u0442\u0440\u0430\u043c\u0438 \u0438 \u043c\u043d\u043e\u0433\u0438\u043c \u0434\u0440\u0443\u0433\u0438\u043c. \u041e\u043d\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 <code>Ansible<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u043e\u0442\u0442\u0443\u0434\u0430, \u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u0435\u0439\u0448\u0438\u043c\u0438, \u0438 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0435 \u0438\u0437 <a href=\"https:\/\/galaxy.ansible.com\/ui\/repo\/published\/containers\/podman\/\" rel=\"noopener noreferrer nofollow\">Ansible Galaxy<\/a>:<\/p>\n<pre><code class=\"bash\">ansible-galaxy collection install containers.podman<\/code><\/pre>\n<p>\u0438\u043b\u0438, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u0438 \u0441\u0432\u0435\u0436\u0435\u0435, \u0432\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u0438\u0437 <a href=\"https:\/\/github.com\/containers\/ansible-podman-collections\" rel=\"noopener noreferrer nofollow\">\u043c\u0430\u0441\u0442\u0435\u0440\u0430<\/a>:<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/containers\/ansible-podman-collections cd ansible-podman-collections ansible-galaxy collection install --force .<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b!<\/p>\n<h4>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h4>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0437\u0443\u0447\u0438\u043c <a href=\"https:\/\/docs.podman.io\/en\/latest\/markdown\/podman-push.1.html#encryption-key-key\" rel=\"noopener noreferrer nofollow\">\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0439 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a>. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u0435\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u0435\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0438\u043b\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a <a href=\"https:\/\/www.openssl.org\/\" rel=\"noopener noreferrer nofollow\">OpenSSL<\/a>:<\/p>\n<pre><code class=\"bash\">mkdir -p keys openssl genrsa -out .\/keys\/container_private.pem 2048 &amp;&amp; \\ openssl rsa -in .\/keys\/container_private.pem -pubout -out .\/keys\/container_public.pem<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <code>openssl<\/code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/hub.docker.com\/_\/nginx\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 nginx<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432:<\/p>\n<pre><code class=\"bash\">docker run -it -v $PWD\/keys:\/data:z docker.io\/library\/nginx sh -c \"\\ openssl genrsa -out \/data\/container_private.pem 2048 &amp;&amp; \\ openssl rsa -in \/data\/container_private.pem -pubout -out \/data\/container_public.pem\"<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <code>podman<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>docker<\/code>:<\/p>\n<pre><code class=\"bash\">podman run -it -v $PWD\/keys:\/data:z docker.io\/library\/nginx sh -c \"\\ openssl genrsa -out \/data\/container_private.pem 2048 &amp;&amp; \\ openssl rsa -in \/data\/container_private.pem -pubout -out \/data\/container_public.pem\"<\/code><\/pre>\n<p>\u0412 <code>Ansible<\/code> \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">- name: Generate SSL keys   containers.podman.podman_container:     name: temporary     state: started     image: docker.io\/library\/nginx     rm: true     volumes:       - \/tmp\/keys:\/data:z     command:       - bash       - -c       - >-         openssl genrsa -out \/data\/container_private.pem 2048 &amp;&amp;         openssl rsa -in \/data\/container_private.pem -pubout -out \/data\/container_public.pem <\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <code>\/tmp\/keys<\/code>, \u0438\u043b\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0442\u044c.<\/p>\n<h4>\u0421\u0431\u043e\u0440\u043a\u0430 \u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h4>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<br \/>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 <code>Dockerfile<\/code>:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF> Dockerfile FROM docker.io\/library\/nginx COPY index.html \/usr\/share\/nginx\/html\/index.html EOF  echo \"test passed\" > index.html podman build . -t docker.io\/sshnaidm\/something:open<\/code><\/pre>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>Podman<\/code> \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u0432 \u0440\u0435\u0435\u0441\u0442\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <code>Podman<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 podman \u0438 docker \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435:<\/p>\n<pre><code class=\"bash\">docker save docker.io\/sshnaidm\/something:open | podman load # \u0438\u043b\u0438 \u0442\u0430\u043a podman image push docker.io\/sshnaidm\/something:close docker-daemon:docker.io\/sshnaidm\/something:closed<\/code><\/pre>\n<p>\u0412 Ansible \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435, \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0438 \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u0435 \u043e\u0431\u0440\u0430\u0437 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code class=\"yaml\">- name: Create Dockerfile   copy:     content: |       FROM docker.io\/library\/nginx       COPY index.html \/usr\/share\/nginx\/html\/index.html     dest: \"{{ playbook_dir }}\/Dockerfile\"  - name: Create index.html   copy:     content: \"&lt;h1>test passed!&lt;\/h1>\"     dest: \"{{ playbook_dir }}\/index.html\"  - name: Build and push the image   containers.podman.podman_image:     name: docker.io\/sshnaidm\/something     tag: closed     path: \"{{ playbook_dir }}\"     state: build     build:       file: \"{{ playbook_dir }}\/Dockerfile\"     push: true     push_args:       dest: docker.io\/sshnaidm\/something:closed       extra_args: --encryption-key jwe:\/absolute\/path\/to\/keys\/container_public.pem <\/code><\/pre>\n<h4>\u0422\u0435\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0441 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/h4>\n<p>\u0422\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>podman<\/code> \u0441 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>JWE<\/code>:<\/p>\n<pre><code class=\"bash\">cd keys\/ podman tag docker.io\/sshnaidm\/something:open docker.io\/sshnaidm\/something:closed podman push --encryption-key jwe:container_public.pem docker.io\/sshnaidm\/something:closed<\/code><\/pre>\n<p>\u041c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u043d\u0430\u0448 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0432 Docker Hub. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>docker<\/code> \u0438\u043b\u0438 <code>podman<\/code>:<\/p>\n<pre><code class=\"bash\">$ podman pull docker.io\/sshnaidm\/something:closed Trying to pull docker.io\/sshnaidm\/something:closed... Getting image source signatures Copying blob 37745a742023 [--------------------------------------] 0.0b \/ 1.4KiB | 0.0 b\/s Copying blob 37745a742023 done   |  [skipped...] Error: writing blob: adding layer with blob \"sha256:69458e593f618c768281ca90b8ed5eb78df30df39902d948f894fd8c7e80906f\": processing tar file(archive\/tar: invalid tar header): exit status 1 <\/code><\/pre>\n<p>\u041d\u0435-\u0430, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \ud83d\ude42<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>docker<\/code>:<\/p>\n<pre><code class=\"bash\">$ docker pull docker.io\/sshnaidm\/something:closed closed: Pulling from sshnaidm\/something 69458e593f61: Extracting [==================================================>]  32.74MB\/32.74MB 1a1e276c1a3b: Download complete  [skipped...] failed to register layer: archive\/tar: invalid tar header <\/code><\/pre>\n<p>\u041d\u0435-\u0430, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \ud83d\ude42<\/p>\n<p>\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0431\u0435\u0437 \u043a\u043b\u044e\u0447\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u044f \u043a\u043b\u044e\u0447 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e, \u0447\u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438!<\/p>\n<h4>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430<\/h4>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437:<\/p>\n<pre><code class=\"bash\">cd keys\/ podman pull --decryption-key container_private.pem docker.io\/sshnaidm\/something:closed # Load it to Docker if you can't use Podman: podman save docker.io\/sshnaidm\/something:closed | docker load docker run -d --name webserver -p 8888:80 docker.io\/sshnaidm\/something:closed curl localhost:8888 $ test passed <\/code><\/pre>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Ansible \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0441\u043a\u0435:<\/p>\n<pre><code class=\"yaml\">- name: Run container   containers.podman.podman_container:     name: webserver     image: docker.io\/sshnaidm\/something:closed     state: started     decryption_key: \/full\/path\/to\/keys\/container_private.pem     publish:       - 8888:80 <\/code><\/pre>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446:<\/p>\n<pre><code class=\"bash\">curl localhost:8888 $ test passed <\/code><\/pre>\n<h4>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 Bash-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 Ansible Playbook<\/h4>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b <code>bash<\/code> \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043b\u0435\u0439\u0431\u0443\u043a Ansible \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 \u0438\u0437 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0435\u0441\u0442\u0440\u0430, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d \u0431\u044b\u043b \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c:<\/p>\n<p>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043e\u0431\u0440\u0430\u0437, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code class=\"bash\"># On client, build image, generate keys, and push encrypted openssl genrsa -out container_private.pem 2048 openssl rsa -in container_private.pem -pubout -out .\/keys\/container_public.pem  cat &lt;&lt;EOF> Dockerfile FROM docker.io\/library\/nginx COPY index.html \/usr\/share\/nginx\/html\/index.html EOF  echo \"test passed\" > index.html  podman build . -t docker.io\/sshnaidm\/something:production podman push --encryption-key jwe:container_public.pem docker.io\/sshnaidm\/something:production <\/code><\/pre>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b container_private.pem \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0442\u0430\u043c:<\/p>\n<pre><code class=\"bash\">podman pull --decryption-key container_private.pem docker.io\/sshnaidm\/something:production # In case of Docker: podman save docker.io\/sshnaidm\/something:production | docker load docker run -d --name webserver -p 8888:80 docker.io\/sshnaidm\/something:production # In case of Podman: podman run -d --name webserver -p 8888:80 docker.io\/sshnaidm\/something:production <\/code><\/pre>\n<p>\u0418\u043b\u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043e\u0434\u043d\u0438\u043c Ansible \u043f\u043b\u0435\u0439\u0431\u0443\u043a\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">- hosts: client   tasks:      - name: Generate SSL keys       containers.podman.podman_container:         name: temporary         state: started         image: docker.io\/library\/nginx         rm: true         volumes:           - \/tmp\/keys:\/data:z         command:           - bash           - -c           - >-             openssl genrsa -out   \/data\/container_private.pem 2048 &amp;&amp;             openssl rsa -in \/data\/container_private.pem -pubout -out \/data\/container_public.pem      - name: Create Dockerfile       copy:         content: |           FROM docker.io\/library\/nginx           COPY index.html \/usr\/share\/nginx\/html\/index.html         dest: \"{{ playbook_dir }}\/Dockerfile\"      - name: Create index.html       copy:         content: \"&lt;h1>test passed!&lt;\/h1>\"         dest: \"{{ playbook_dir }}\/index.html\"      - name: Build and push image       containers.podman.podman_image:         name: docker.io\/sshnaidm\/something         tag: production         path: \"{{ playbook_dir }}\"         state: build         build:           file: \"{{ playbook_dir }}\/Dockerfile\"         push: true         push_args:           dest: docker.io\/sshnaidm\/something:production           extra_args: --encryption-key jwe:\/absolute\/path\/to\/keys\/container_public.pem  - hosts: server   tasks:      - name: Distribute keys       copy:         src: \/full\/path\/to\/keys\/container_private.pem         dest: \/full\/path\/to\/keys\/container_private.pem      - name: Run container with Podman       containers.podman.podman_container:         name: webserver<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-378037","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=378037"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378037\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=378037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=378037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=378037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}