{"id":62433,"date":"2025-04-02T12:43:45","date_gmt":"2025-04-02T09:13:45","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/?p=62433"},"modified":"2025-04-02T12:43:45","modified_gmt":"2025-04-02T09:13:45","slug":"%d8%a2%d9%85%d9%88%d8%b2%d8%b4-%d9%86%d8%b5%d8%a8-docker-%d8%af%d8%b1-ubuntu","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/%d8%a2%d9%85%d9%88%d8%b2%d8%b4-%d9%86%d8%b5%d8%a8-docker-%d8%af%d8%b1-ubuntu\/","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 \u0646\u0635\u0628 Docker \u062f\u0631 Ubuntu"},"content":{"rendered":"<h2 class=\"wp-block-heading\"><strong>\u0631\u0648\u0634 \u0627\u0648\u0644 \u2013 \u0646\u0635\u0628 \u062f\u0627\u06a9\u0631 \u0628\u0627 \u0631\u06cc\u067e\u0627\u0632\u06cc\u062a\u0648\u0631\u06cc Docker<\/strong><\/h2>\n<p>1- \u0644\u06cc\u0633\u062a \u0628\u0633\u062a\u0647 \u0647\u0627 \u0631\u0648 \u0628\u0647 \u0631\u0648\u0632 \u0631\u0633\u0627\u0646\u06cc \u0645\u06cc\u06a9\u0646\u06cc\u0645 \u0648 \u0633\u067e\u0633 \u0686\u0646\u062f \u0628\u0633\u062a\u0647 \u067e\u06cc\u0634\u200c\u0646\u06cc\u0627\u0632 \u0631\u0627 \u0646\u0635\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f \u06a9\u0647 \u0628\u0647 APT \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f \u0628\u0633\u062a\u0647\u200c\u0647\u0627 \u0631\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 HTTPS \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u062f.<\/p>\n<pre class=\"wp-block-code\"><code>sudo apt-get update\r\nsudo apt-get install ca-certificates curl gnupg<\/code><\/pre>\n<p>2- \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u06a9\u0644\u06cc\u062f <strong>GPG <\/strong>\u0631\u06cc\u067e\u0627\u0632\u06cc\u062a\u0648\u0631\u06cc \u06cc\u0627 \u0647\u0645\u0627\u0646 \u0645\u062e\u0632\u0646 \u0631\u0633\u0645\u06cc <strong>Docker <\/strong>\u0627\u06cc\u0646 \u0637\u0648\u0631\u06cc \u0628\u0633\u062a\u0647 \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 Docker \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc\u06a9\u0646\u06cc\u0645 \u0645\u0637\u0645\u0626\u0646 \u0645\u06cc\u0634\u0648\u06cc\u0645 \u0627\u0632 \u0645\u0646\u0628\u0639 \u0645\u0639\u062a\u0628\u0631 \u0648 \u0628\u062f\u0648\u0646 \u0647\u06cc\u0686 \u06af\u0648\u0646\u0647 \u062a\u063a\u06cc\u06cc\u0631\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc \u06a9\u0646\u06cc\u0645.<\/p>\n<pre class=\"wp-block-code\"><code>sudo install -m 0755 -d \/etc\/apt\/keyrings\r\ncurl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/etc\/apt\/keyrings\/docker.gpg\r\nsudo chmod a+r \/etc\/apt\/keyrings\/docker.gpg<\/code><\/pre>\n<p>3- \u0631\u06cc\u067e\u0627\u0632\u06cc\u062a\u0648\u0631\u06cc \u062f\u0627\u06a9\u0631 \u0631\u0627 \u0628\u0647 \u0645\u0646\u0627\u0628\u0639 APT \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"wp-block-code\"><code>echo \r\n\"deb [arch=\"$(dpkg --print-architecture)\" signed-by=\/etc\/apt\/keyrings\/docker.gpg] https:\/\/download.docker.com\/linux\/ubuntu \r\n\"$(. \/etc\/os-release &amp;&amp; echo \"$VERSION_CODENAME\")\" stable\" | \r\nsudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null<\/code><\/pre>\n<p><strong>4- \u0646\u0635\u0628 Docker Engine<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>sudo apt-get update<\/code><\/pre>\n<pre class=\"wp-block-code\"><code>sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin<\/code><\/pre>\n<p><strong>5- \u0627\u062c\u0631\u0627 hello-world<br \/>\n<\/strong><\/p>\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile is-vertically-aligned-top\">\n<figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-26766 size-full\" src=\"https:\/\/techtik.com\/wp-content\/uploads\/2023\/06\/install-docker2.png\" alt=\"\" width=\"500\" height=\"306\" title=\"\"><\/figure>\n<div class=\"wp-block-media-text__content\">\n<p>\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f \u06a9\u0647 \u062f\u0627\u06a9\u0631 \u0628\u0647 \u062f\u0631\u0633\u062a\u06cc \u0646\u0635\u0628 \u0634\u062f\u0647 \u0627\u0633\u062a <strong>hello-world<\/strong> \u0631\u0627 \u0627\u062c\u0631\u0627 \u0645\u06cc\u06a9\u0646\u06cc\u0645.<\/p>\n<\/div>\n<\/div>\n<pre class=\"wp-block-code\"><code>sudo docker run hello-world<\/code><\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-26769\" src=\"https:\/\/techtik.com\/wp-content\/uploads\/2023\/07\/Test-Docker-installation-on-Ubuntu.png\" alt=\"\" width=\"731\" height=\"531\" title=\"\"><\/figure>\n<\/div>\n<p><strong>\u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u06cc\u0648\u0632\u0631 \u0641\u0639\u0644\u06cc \u0628\u0647 \u06af\u0631\u0648\u0647 Docker<\/strong> (\u0627\u062e\u062a\u06cc\u0627\u0631\u06cc)<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a Docker \u0628\u062f\u0648\u0646 sudo \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u06cc\u0648\u0632\u0631 \u062e\u0648\u062f\u0645\u0648\u0646 \u0631\u0627 \u062f\u0631 \u06af\u0631\u0648\u0647 \u062f\u0627\u06a9\u0631 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc\u06a9\u0646\u06cc\u0645.<\/p>\n<pre class=\"wp-block-code\"><code>sudo gpasswd -a $USER docker<\/code><\/pre>\n<pre class=\"wp-block-code\"><code>newgrp docker<\/code><\/pre>\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\" \/>\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\" \/>\n<div class=\"index-title\"><\/div>\n<h2 class=\"wp-block-heading\"><strong>\u0631\u0648\u0634 \u062f\u0648\u0645- \u0646\u0635\u0628 \u062f\u0627\u06a9\u0631 \u0628\u0627 SNAP<\/strong><\/h2>\n<p>\u06cc\u06a9\u06cc \u0627\u0632 \u0633\u0631\u06cc\u0639\u062a\u0631\u06cc\u0646 \u0631\u0627\u0647 \u0647\u0627 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 Docker \u062f\u0631 \u0644\u06cc\u0646\u0648\u06a9\u0633 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 \u0648 \u0646\u0633\u062e\u0647 \u0647\u0627\u06cc \u062f\u06cc\u06af\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 <strong>SNAP <\/strong>\u0627\u0633\u062a\u060c \u062f\u0631 \u0627\u06cc\u0646\u062c\u0627 \u0645\u0627 \u06cc\u0627\u062f \u0645\u06cc \u06af\u06cc\u0631\u06cc\u0645 \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0627\u0632 \u0622\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u062f\u0627\u06a9\u0631 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Snap \u06a9\u0627\u0641\u06cc\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"wp-block-code\"><code>sudo snap install docker<\/code><\/pre>\n<p>\u0646\u0635\u0628 \u062a\u0645\u0627\u0645 \u0634\u062f. \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f\u0646 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u062f\u0627\u06a9\u0631 \u0628\u0627\u06cc\u062f \u0627\u0632 Sudo \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645 \u0627\u0645\u0627 \u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u0647\u06cc\u0645 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u062f\u0627\u06a9\u0631 \u0628\u062f\u0648\u0646 sudo \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645 \u06cc\u0647 \u06af\u0631\u0648\u0647 \u0628\u0646\u0627\u0645 docker \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u06a9\u0646\u06cc\u0645. (\u0627\u062e\u062a\u06cc\u0627\u0631\u06cc)<\/p>\n<pre class=\"wp-block-code\"><code>sudo addgroup --system docker<\/code><\/pre>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u06af\u0631\u0648\u0647 \u062f\u0627\u06a9\u0631\u060c \u06a9\u0627\u0631\u0628\u0631 \u0641\u0639\u0644\u06cc \u062e\u0648\u062f \u0631\u0627 \u0646\u06cc\u0632 \u062f\u0631 \u0627\u0646 \u0627\u0636\u0627\u0641\u0647 \u0627\u0636\u0627\u0641\u0647 \u0645\u06cc\u06a9\u0646\u06cc\u0645.<br \/>\n\u0627\u06af\u0631 \u0628\u0639\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 newgrp docker \u0647\u0646\u0648\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a docker \u0646\u06cc\u0627\u0632\u0645\u0646\u062f sudo \u0628\u0648\u062f \u06a9\u0627\u0641\u06cc\u0647 \u06cc\u0628\u0627\u0631 log out \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"wp-block-code\"><code>sudo adduser $USER docker<\/code><\/pre>\n<pre class=\"wp-block-code\"><code>newgrp docker<\/code><\/pre>\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\" \/>\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\" \/>\n<div class=\"index-title\"><\/div>\n<h2 class=\"wp-block-heading\"><strong>\u0631\u0648\u0634 \u0633\u0648\u0645 \u2013 \u0646\u0635\u0628 \u062f\u0627\u06a9\u0631 \u0628\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a<\/strong><\/h2>\n<p>\u0627\u06cc\u0646 \u0631\u0648\u0634 \u0647\u0645 \u062e\u06cc\u0644\u06cc \u0622\u0633\u0648\u0646\u0647 \u06cc\u0647 \u0641\u0627\u06cc\u0644 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u062f\u0627\u0646\u0644\u0648\u062f \u0645\u06cc\u06a9\u0646\u06cc\u0645 \u0648 \u0628\u0639\u062f \u0627\u062c\u0631\u0627\u0634 \u0645\u06cc\u06a9\u0646\u06cc\u0645.<\/p>\n<p class=\"has-white-color has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background has-text-color has-background has-link-color wp-elements-126e631fa1ce1d7f5172f1d7614a33f3\">\u0641\u0642\u0637 \u0642\u0628\u0644 \u0627\u062c\u0631\u0627 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631 \u0645\u0637\u0645\u0626\u0646 \u0628\u0627\u0634\u06cc\u062f <strong>curl<\/strong> \u0646\u0635\u0628 \u0634\u062f\u0647 \u0628\u0627\u0634\u062f.<\/p>\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/get.docker.com -o get-docker.sh\r\nsudo sh .\/get-docker.sh --dry-run<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0631\u0648\u0634 \u0627\u0648\u0644 \u2013 \u0646\u0635\u0628 \u062f\u0627\u06a9\u0631 \u0628\u0627 \u0631\u06cc\u067e\u0627\u0632\u06cc\u062a\u0648\u0631\u06cc Docker 1- \u0644\u06cc\u0633\u062a \u0628\u0633\u062a\u0647 \u0647\u0627 \u0631\u0648 \u0628\u0647 \u0631\u0648\u0632 \u0631\u0633\u0627\u0646\u06cc \u0645\u06cc\u06a9\u0646\u06cc\u0645 \u0648 \u0633\u067e\u0633 \u0686\u0646\u062f \u0628\u0633\u062a\u0647 \u067e\u06cc\u0634\u200c\u0646\u06cc\u0627\u0632 \u0631\u0627 \u0646\u0635\u0628 \u0646\u0645\u0627\u06cc\u06cc\u062f \u06a9\u0647 \u0628\u0647 APT \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f \u0628\u0633\u062a\u0647\u200c\u0647\u0627 \u0631\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 HTTPS \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u062f. sudo apt-get update sudo apt-get install ca-certificates curl gnupg 2- \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u06a9\u0644\u06cc\u062f GPG \u0631\u06cc\u067e\u0627\u0632\u06cc\u062a\u0648\u0631\u06cc \u06cc\u0627 \u0647\u0645\u0627\u0646 \u0645\u062e\u0632\u0646 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":62434,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,34],"tags":[],"class_list":["post-62433","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-28","category-server"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/62433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=62433"}],"version-history":[{"count":1,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/62433\/revisions"}],"predecessor-version":[{"id":62442,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/62433\/revisions\/62442"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media\/62434"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=62433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=62433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=62433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}