{"id":237,"date":"2025-09-05T03:18:43","date_gmt":"2025-09-05T03:18:43","guid":{"rendered":"http:\/\/123.249.119.122\/Wordpress\/?p=237"},"modified":"2025-09-05T03:19:32","modified_gmt":"2025-09-05T03:19:32","slug":"the-docker","status":"publish","type":"post","link":"http:\/\/123.249.119.122\/Wordpress\/index.php\/2025\/09\/05\/the-docker\/","title":{"rendered":"The Docker"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong><em>1.The Container<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Container is a vitualization technology which can make package of application and provides PaaS service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The most common engine of container is Docker,Containerd,Podman and so on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>2.How to install a docker?<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First,you need check your software repository and install docker,containerd.io,docker-compose,and so on.It depends on your operating system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then,If your software repository don&#8217;t have any package of docker,you can add the official repository of docker.Input <strong>&#8216;dnf install -y yum-utils&#8217;<\/strong>.And then input<strong> &#8216;yum-config-manager &#8211;add-repo (repository url)&#8217;<\/strong>.You can choose your repository in <a href=\"https:\/\/download.docker.com\/\">https:\/\/download.docker.com\/<\/a>,it depends on your needs,depends on your operating system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally,install docker and containerd.io package by &#8216;<strong>dnf install -y (package)&#8217; <\/strong>command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>3.SoftWare Repository for Container <\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can register your account and refer to the relative official website(or platform) to use the container service.In the Experience Center,you can learn how to login in your docker account,and pull\/push any images.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"152\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-1024x152.png\" alt=\"\" class=\"wp-image-239\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-1024x152.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-300x44.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-768x114.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-1536x228.png 1536w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image.png 1544w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the Software Repository for Container page,there are many manuscripts.You can learn how to pull\/push the image,how to run the image,how to configure the image accelerator.The accelerator file is &nbsp;<strong>&#8216;\/etc\/docker\/daemon.json&#8217;<\/strong>.You can choose the image in the image center.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>4.How to run a docker?<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Input <strong>&#8216;docker pull hello-world&#8217;<\/strong> to pull &#8216;hello-world&#8217; image.Input <strong>&#8216;docker images&#8217;<\/strong> to check the image list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"127\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-3-1024x127.png\" alt=\"\" class=\"wp-image-242\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-3-1024x127.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-3-300x37.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-3-768x95.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-3.png 1117w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Input <strong>&#8216;docker images hello-world&#8217;<\/strong> to screen out the &#8216;hello -world&#8217; image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"45\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-4.png\" alt=\"\" class=\"wp-image-243\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-4.png 802w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-4-300x17.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-4-768x43.png 768w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Input <strong>&#8216;docker run hello-world&#8217;<\/strong> to run the &#8216;hello-world&#8217; image.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>5.How to start the nginx service by docker?<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The image &#8216;nginx:latest&#8217; is in the repository.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"805\" height=\"67\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-5.png\" alt=\"\" class=\"wp-image-246\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-5.png 805w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-5-300x25.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-5-768x64.png 768w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the nginx service,the default port is 80.Input <strong>&#8216;nestat -tnlp |grep 80&#8217;<\/strong> to check the 80 ports.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"844\" height=\"47\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-11.png\" alt=\"\" class=\"wp-image-253\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-11.png 844w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-11-300x17.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-11-768x43.png 768w\" sizes=\"auto, (max-width: 844px) 100vw, 844px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The port 80 is occupied,and the httpd service is running.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"846\" height=\"162\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-12.png\" alt=\"\" class=\"wp-image-254\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-12.png 846w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-12-300x57.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-12-768x147.png 768w\" sizes=\"auto, (max-width: 846px) 100vw, 846px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If the port 80 is occupied(running a service,running another docker,and so on),you can change a new port to run your nginx docker image.Input <strong>&#8216;docker run -d &#8211;name MyNginx -p 81:80 nginx&#8217;<\/strong> to run the nginx image.In this command,&#8217;-d&#8217; means &#8216;detached mode&#8217;,the docker image is running in the backstage;&#8217;MyNginx&#8217; is the name of running docker image;&#8217;-p&#8217; means the port,81 is the port of the docker process,80 is the default port;the end is the docker image name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the docker is running,you can input <strong>&#8216;docker ps&#8217;<\/strong> to watch it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"62\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-7-1024x62.png\" alt=\"\" class=\"wp-image-248\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-7-1024x62.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-7-300x18.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-7-768x47.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-7.png 1216w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Input &#8216;IP(or domain name):port(81)&#8217;,you can see this page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"548\" height=\"219\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-8.png\" alt=\"\" class=\"wp-image-250\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-8.png 548w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-8-300x120.png 300w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>6.How to start the nextcloud by docker?<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pull the nextcloud image first,input <strong>&#8216;docker pull nextcloud&#8217;<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The port of nextcloud process is 81.If the port 81 is occupied by the nginx image,then input <strong>&#8216;docker stop MyNginx&#8217;<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"903\" height=\"43\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-13.png\" alt=\"\" class=\"wp-image-255\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-13.png 903w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-13-300x14.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-13-768x37.png 768w\" sizes=\"auto, (max-width: 903px) 100vw, 903px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"417\" height=\"48\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-14.png\" alt=\"\" class=\"wp-image-256\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-14.png 417w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-14-300x35.png 300w\" sizes=\"auto, (max-width: 417px) 100vw, 417px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Input <strong>&#8216;docker ps&#8217;<\/strong>,there&#8217;s no running images.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"44\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-9-1024x44.png\" alt=\"\" class=\"wp-image-251\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-9-1024x44.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-9-300x13.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-9-768x33.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-9.png 1139w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And then,input <strong>&#8216;docker run -d &#8211;name MyNextCloud -p 81:80 nextcloud&#8217;<\/strong> to start the nextcloud.If MyNextCloud is created,input <strong>&#8216;docker start MyNextCloud&#8217;<\/strong> to start it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally,you can visit your nextcloud by &#8216;IP(or domain name):port(81)&#8217;.Nextcloud is the personal network disk.You can store your file,your data in the nextcloud.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"156\" src=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-15-1024x156.png\" alt=\"\" class=\"wp-image-257\" srcset=\"http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-15-1024x156.png 1024w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-15-300x46.png 300w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-15-768x117.png 768w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-15-1536x234.png 1536w, http:\/\/123.249.119.122\/Wordpress\/wp-content\/uploads\/2025\/09\/image-15.png 1793w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to run the nextcloud image by docker compose,you can configure the software repository and install the docker compose package.You can edit relative yaml file,and input <strong>&#8216;docker compose up -d&#8217;<\/strong> to start the nextcloud.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.The Container Container is a vitualization technology which can make package of application and provides PaaS service. The most common engine of container is Docker,Containerd,Podman and so on. 2.How to install a docker? First,you need check your software repository and install docker,containerd.io,docker-compose,and so on.It depends on your operating system. Then,If your software repository don&#8217;t have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-237","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":6,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":259,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/posts\/237\/revisions\/259"}],"wp:attachment":[{"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/123.249.119.122\/Wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}