{"id":1213,"date":"2017-06-08T13:20:48","date_gmt":"2017-06-08T10:20:48","guid":{"rendered":"https:\/\/itedu.center\/ua\/blog\/?p=1213"},"modified":"2024-04-18T22:13:47","modified_gmt":"2024-04-18T19:13:47","slug":"docker_linux","status":"publish","type":"post","link":"https:\/\/itedu.center\/ua\/blog\/ratings\/docker_linux\/","title":{"rendered":"20 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0440\u043e\u0431\u043e\u0442\u0438 \u0437 Docker \u0432 Linux"},"content":{"rendered":"\n<p>Docker Container \u2014 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0456\u044f, \u044f\u043a\u0430 \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441 \u0440\u043e\u0437\u0433\u043e\u0440\u0442\u0430\u043d\u043d\u044f \u0442\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0456\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430\u043c\u0438 \u0432 \u0441\u0435\u0440\u0435\u0434\u043e\u0432\u0438\u0449\u0456 \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u0456\u0437\u0430\u0446\u0456\u0457 \u043d\u0430 \u0440\u0456\u0432\u043d\u0456 \u043e\u043f\u0435\u0440\u0430\u0446\u0456\u0439\u043d\u043e\u0457 \u0441\u0438\u0441\u0442\u0435\u043c\u0438. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0442\u044c\u0441\u044f \u0434\u043b\u044f CI\/CD \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n\n\n\n<p>\u0423 \u0441\u0442\u0430\u0442\u0442\u0456 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e 20 \u043d\u0430\u0439\u0447\u0430\u0441\u0442\u0456\u0448\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u043d\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 Docker \u043d\u0430 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u0456 Linux-\u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. \u041f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0456\u0457 Docker<\/h2>\n\n\n\n<p>\u041f\u0435\u0440\u0448 \u043d\u0456\u0436 \u0441\u0442\u0430\u0432\u0430\u0442\u0438 \u0434\u043e \u0440\u043e\u0431\u043e\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0437\u043d\u0430\u0442\u0438, \u044f\u043a\u0430 \u0432\u0435\u0440\u0441\u0456\u044f Docker \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f. \u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043d\u044c\u043e \u0432\u0432\u0435\u0441\u0442\u0438:<\/p>\n\n\n\n<p><code>[root@docker ~]# docker --version<br>Docker version 17.03.1-ce, build c6d412e<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2.\u041e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u0457 \u043f\u0440\u043e \u0456\u043d\u0441\u0442\u0430\u043b\u044f\u0446\u0456\u0457<\/h2>\n\n\n\n<p>\u0422\u0430\u043a\u043e\u0436 \u0432\u0430\u0436\u043b\u0438\u0432\u043e \u0437\u043d\u0430\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0443 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044e \u043f\u0440\u043e \u0456\u043d\u0441\u0442\u0430\u043b\u044f\u0446\u0456\u0457, \u0449\u043e \u043c\u043e\u0436\u043d\u0430 \u0437\u0440\u043e\u0431\u0438\u0442\u0438 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438 <code>docker info<\/code>:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. \u041f\u043e\u0448\u0443\u043a Docker \u043e\u0431\u0440\u0430\u0437\u0456\u0432 (images) \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0456 \u0440\u0435\u0433\u0456\u0441\u0442\u0440\u0430<\/h2>\n\n\n\n<p>\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>docker search<\/code>, \u043c\u043e\u0436\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u043f\u043e\u0448\u0443\u043a Docker \u043e\u0431\u0440\u0430\u0437\u0456\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0456 \u0440\u0435\u0433\u0456\u0441\u0442\u0440\u0430 \u0437 \u0442\u0435\u0440\u043c\u0456\u043d\u0430\u043b\u0430. \u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e, \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0437\u043d\u0430\u0439\u0442\u0438 \u043e\u0441\u0442\u0430\u043d\u043d\u0456 Docker \u043e\u0431\u0440\u0430\u0437\u0438 Debian.<\/p>\n\n\n\n<p><code>[root@docker ~]# docker search debian<\/code><\/p>\n\n\n\n<p>\u0412\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044f \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0432\u0438\u0433\u043b\u044f\u0434\u0430\u0442\u0438 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u043d\u043e \u0442\u0430\u043a:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. \u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u043e\u0431\u0440\u0430\u0437\u0456\u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456\u0432<\/h2>\n\n\n\n<p>\u0417\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438 <code>docker pull<\/code> \u043c\u043e\u0436\u043d\u0430 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u0432\u0430\u0442\u0438 \u043e\u0431\u0440\u0430\u0437\u0438 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0437 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0440\u0435\u0433\u0456\u0441\u0442\u0440\u0430 \u0430\u0431\u043e \u0441\u0445\u043e\u0432\u0438\u0449\u0430.<\/p>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<br><code># docker pull &lt;Name-of-Image&gt;<\/code><\/p>\n\n\n\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>docker pull<\/code> \u0437\u0430\u0432\u0436\u0434\u0438 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u0454 \u043e\u0441\u0442\u0430\u043d\u043d\u044e \u0432\u0435\u0440\u0441\u0456\u044e \u043e\u0431\u0440\u0430\u0437\u0443, \u0430\u043b\u0435 \u0454 \u043c\u043e\u0436\u043b\u0438\u0432\u0456\u0441\u0442\u044c \u0432\u043a\u0430\u0437\u0430\u0442\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0438\u0439 \u043e\u0431\u0440\u0430\u0437. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438 \u043e\u0441\u0442\u0430\u043d\u043d\u044e \u0432\u0435\u0440\u0441\u0456\u044e Debian Docker image:<\/p>\n\n\n\n<p><code>[root@docker ~]# docker pull debian<br>Using default tag: latest<br>latest: Pulling from library\/debian<br>10a267c67f42: Already exists<br>Digest: sha256:476959f29a17423a24a17716e058352ff6fbf13d8389e4a561c8ccc758245937<br>Status: Downloaded newer image for debian:latest<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0457 \u0432\u0435\u0440\u0441\u0456\u0457 \u041e\u0421 \u043e\u0431\u0440\u0430\u0437\u0443 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h3>\n\n\n\n<p>\u042f\u043a\u0449\u043e, \u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u043c\u0438 \u0445\u043e\u0447\u0435\u043c\u043e \u0437\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438 \u043e\u0431\u0440\u0430\u0437 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f Ubuntu 14.04.<\/p>\n\n\n\n<p><code>[root@docker ~]# docker pull ubuntu:14.04<br>14.04: Pulling from library\/ubuntu<br>cf0a75889057: Already exists<br>c8de9902faf0: Already exists<br>a3c0f7711c5e: Already exists<br>e6391432e12c: Already exists<br>624ce029a17f: Already exists<br>Digest: sha256:b2a55128abd84a99436157c2fc759cf0a525c273722460e6f8f9630747dfe7e8<br>Status: Downloaded newer image for ubuntu:14.04<br>[root@docker ~]<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0456\u0445 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u0438\u0445 \u043e\u0431\u0440\u0430\u0437\u0456\u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n\n\n\n<p>\u0412\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u043b\u0438 \u043c\u0438 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0443\u0454\u043c\u043e \u043e\u0431\u0440\u0430\u0437\u0438 Docker \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438 <code>docker pull<\/code>, \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u044e\u0442\u044c\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0456 \u043e\u0431\u0440\u0430\u0437\u0438 (\/var\/lib\/docker) \u043d\u0430 Docker \u0441\u0435\u0440\u0432\u0435\u0440\u0456. \u041c\u043e\u0436\u043d\u0430 \u0442\u0430\u043a\u043e\u0436 \u043f\u0435\u0440\u0435\u0440\u0430\u0445\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0456 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u0456 \u043e\u0431\u0440\u0430\u0437\u0438 \u0434\u043e\u043a\u0435\u0440\u0456\u0432 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438 <code>docker images<\/code>:<\/p>\n\n\n\n<p><code>[root@docker ~]# docker images<br>REPOSITORY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TAG &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IMAGE ID &nbsp; &nbsp; &nbsp;        CREATED &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SIZE<br>wordpress&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; latest&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ca96afcfa242&nbsp; &nbsp; &nbsp;   2 weeks ago &nbsp; &nbsp; &nbsp;   406 MB<br>xibosignage\/xibo-xmr &nbsp; release_1.8.1 &nbsp; &nbsp; &nbsp; 223afb5ecffe &nbsp; &nbsp; &nbsp;  2 weeks ago &nbsp; &nbsp; &nbsp; &nbsp; 269 MB<br>ubuntu &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 16.04 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ebcd9d4fca80&nbsp; &nbsp; &nbsp; &nbsp; 2 weeks ago &nbsp; &nbsp; &nbsp; &nbsp; 118 MB<br>ubuntu &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 14.04 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2ff3b426bbaa&nbsp; &nbsp; &nbsp; &nbsp; 2 weeks ago &nbsp; &nbsp; &nbsp; &nbsp; 188 MB<br>centos &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 8140d0c64310&nbsp; &nbsp; &nbsp; &nbsp; 2 weeks ago &nbsp; &nbsp; &nbsp; &nbsp; 193 MB<br>mysql&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 5.6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ed7b6c642b9d&nbsp; &nbsp; &nbsp; &nbsp; 3 weeks ago &nbsp; &nbsp; &nbsp; &nbsp; 299 MB<br>mysql&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 5.7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e799c7f9ae9c&nbsp; &nbsp; &nbsp; &nbsp; 3 weeks ago &nbsp; &nbsp; &nbsp; &nbsp; 407 MB<br>debian &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; latest&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3e83c23dba6a&nbsp; &nbsp; &nbsp; &nbsp; 3 weeks ago &nbsp; &nbsp; &nbsp; &nbsp; 124 MB<br>xibosignage\/xibo-cms &nbsp; latest&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 9678c5299918&nbsp; &nbsp; &nbsp; &nbsp; 5 weeks ago &nbsp; &nbsp; &nbsp; &nbsp; 511 MB<br>xibosignage\/xibo-cms &nbsp; release_1.8.1 &nbsp; &nbsp; &nbsp; c2767fdc7262&nbsp; &nbsp; &nbsp; &nbsp; 5 weeks ago &nbsp; &nbsp; &nbsp; &nbsp; 511 MB<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">6. \u0417\u0430\u043f\u0443\u0441\u043a Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n\n\n\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u044c\u0441\u044f \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438 <code>docker run<\/code>. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u043c\u0438 \u0445\u043e\u0447\u0435\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0437 \u043e\u0431\u0440\u0430\u0437\u043e\u043c Debian.<\/p>\n\n\n\n<p><code>[root@docker ~]# docker run -it -p 9000:80<br>--name=debian_container1 debian<br>&amp;amp;amp;amp;amp;amp;lt;strong&amp;amp;amp;amp;amp;amp;gt;root@9254e01fadad:\/#<\/code><\/p>\n\n\n\n<p>\u0426\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0437 \u0456\u043c&#8217;\u044f\u043c <code>debian_container<\/code>1, \u0434\u0430\u043b\u0456 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0438 <code>pat rule<\/code> \u0442\u0430\u043a\u0438\u043c \u0447\u0438\u043d\u043e\u043c, \u0449\u043e \u044f\u043a\u0449\u043e \u044f\u043a\u0438\u0439-\u043d\u0435\u0431\u0443\u0434\u044c \u0437\u0430\u043f\u0438\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043e 9000 \u043f\u043e\u0440\u0442\u0443 \u043d\u0430 \u0445\u043e\u0441\u0442\u0456 docker, \u0442\u043e \u0432\u0456\u043d \u0431\u0443\u0434\u0435 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 debian \u043d\u0430 80-\u043f\u043e\u0440\u0442\u0456. \u041c\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u043c\u043e \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432\u0456\u0434\u0440\u0430\u0437\u0443 \u043f\u0456\u0441\u043b\u044f \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0438. \u0429\u043e\u0431 \u0437\u0443\u043f\u0438\u043d\u0438\u0442\u0438\/\u0437\u0430\u043a\u0440\u0438\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 exit \u0430\u0431\u043e \u00abctrl+p+q\u00bb (\u0437\u0430\u043a\u0440\u0438\u0432\u0430\u0454 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0435\u0437 \u0432\u0438\u0445\u043e\u0434\u0443).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. \u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 \u0434\u0435\u043c\u043e\u043d\u0430<\/h2>\n\n\n\n<p>\u041c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 \u0432\u0456\u0434&#8217;\u0454\u0434\u043d\u0430\u043d\u043d\u044f \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043e\u043f\u0446\u0456\u0457 <code>-d<\/code> \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0456 <code>docker run<\/code>. \u041f\u0440\u0438\u043a\u043b\u0430\u0434 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043d\u0438\u0436\u0447\u0435:<\/p>\n\n\n\n<p><code>[root@docker ~]# docker run -it -d -p 9001:80 --name=web_container centos:7<br>258adf2f71fba82aa04e5f7e9ebba27b8ad87b0439e9bd7d2bcf7e3c40279d54<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8. \u041e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u043e\u0457 \u043a\u043e\u043d\u0441\u043e\u043b\u0456 \u0437 &#8216;docker attach&#8217;<\/h2>\n\n\n\n<p>\u0423 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043e\u043c\u0443 \u0432\u0438\u0449\u0435 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u0456 \u0443 \u043d\u0430\u0441 \u0454 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 \u0434\u0435\u043c\u043e\u043d\u0430, \u0442\u043e\u0436 \u043c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0439\u043e\u0433\u043e \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438 <code>docker attach<\/code>.<\/p>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<br><code># docker attach {container_name \u0430\u0431\u043e container_id}<\/code><\/p>\n\n\n\n<p><code>[root@docker ~]# docker attach web_container<br>[root@258adf2f71fb \/]#<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">9. \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456\u0432 \u043f\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0456 docker ps<\/h2>\n\n\n\n<p>\u0429\u043e\u0431 \u043f\u0435\u0440\u0435\u043b\u0456\u0447\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0456 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438, \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>docker ps<\/code>.<\/p>\n\n\n\n<p><code>[root@docker ~]# docker ps<\/code><\/p>\n\n\n\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0440\u0430\u0445\u0443\u0432\u0430\u043d\u043d\u044f \u0432\u0441\u0456\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456\u0432 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 docker ps -a.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">10. \u0417\u0430\u043f\u0443\u0441\u043a, \u0437\u0443\u043f\u0438\u043d\u043a\u0430, \u043f\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u0456 \u0437\u043d\u0438\u0449\u0435\u043d\u043d\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456\u0432<\/h2>\n\n\n\n<p>\u042f\u043a \u0456 \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0456 \u043c\u0430\u0448\u0438\u043d\u0438, \u043c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u0438, \u0437\u0443\u043f\u0438\u043d\u044f\u0442\u0438 \u0442\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u0438 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u0437\u0443\u043f\u0438\u043d\u043a\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430<\/p>\n\n\n\n<p><code>[root@docker ~]# docker stop db_container1<br>db_container1<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438<\/p>\n\n\n\n<p><code>[root@docker ~]# docker start db_container1<br>db_container1<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430, \u044f\u043a\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n\n\n\n<p><code>[root@docker ~]# docker restart db_container1<br>db_container1<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<p>\u041c\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u043c\u043e \u0437\u043d\u0438\u0449\u0438\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n\n\n\n<p><code>[root@docker ~]# docker kill db_container2<br>db_container2<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">11. \u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438\/\u043f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440<\/h2>\n\n\n\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>docker rm<\/code> \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0456\u0449\u0435\u043d\u043d\u044f \u0430\u0431\u043e \u0432\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u041f\u0440\u0430\u0446\u044e\u0454 \u0442\u0456\u043b\u044c\u043a\u0438 \u0442\u043e\u0434\u0456, \u043a\u043e\u043b\u0438 Docker \u0437\u0443\u043f\u0438\u043d\u0435\u043d\u0438\u0439\/\u0432\u0438\u043c\u043a\u043d\u0435\u043d\u0438\u0439.<\/p>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<br><code># docker rm {container_name_OR_container_id}<\/code><\/p>\n\n\n\n<p><code>[root@docker ~]# docker rm db_container2<br>db_container2<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">12. \u0412\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f\/\u043f\u0435\u0440\u0435\u043c\u0456\u0449\u0435\u043d\u043d\u044f \u043e\u0431\u0440\u0430\u0437\u0456\u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n\n\n\n<p>\u041f\u043e\u0434\u0456\u0431\u043d\u043e \u0434\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456\u0432, \u043c\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u043c\u043e \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0430\u0431\u043e \u043f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u043e\u0431\u0440\u0430\u0437\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u044e <code>docker rmi<\/code>. \u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e, \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u043e\u0431\u0440\u0430\u0437 &#8216;Ubuntu: 14.04:<\/p>\n\n\n\n<p><code>[root@docker ~]# docker rmi ubuntu:14.04<br>Untagged: ubuntu:14.04<br>Untagged: ubuntu@sha256:b2a55128abd84a99436157c2fc759cf0a525c273722460e6f8f9630747dfe7e8<br>Deleted: sha256:2ff3b426bbaafba63cae165e8f6a4955a24a53cdf6d25cce00353e97cda3df71<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<p>\u0423 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0456\u0439 \u0432\u0438\u0449\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0456 \u0437\u0430\u043c\u0456\u0441\u0442\u044c \u043d\u0430\u0437\u0432\u0438 \u043e\u0431\u0440\u0430\u0437\u0443 \u043c\u043e\u0436\u043d\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0439\u043e\u0433\u043e id:<\/p>\n\n\n\n<p><code>[root@docker ~]# docker rmi 2ff3b426bba<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">13. \u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0442\u0430 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u0438 \u043e\u0431\u0440\u0430\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 Docker \u0432\/\u0437 \u0444\u0430\u0439\u043b\u0443 tar<\/h2>\n\n\n\n<p>\u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e, \u0449\u043e \u043c\u0438 \u0437\u0440\u043e\u0431\u0438\u043b\u0438 \u0434\u0435\u044f\u043a\u0456 \u0437\u043c\u0456\u043d\u0438 \u0432 debian-\u043e\u0431\u0440\u0430\u0437\u0456 \u0442\u0430 \u0445\u043e\u0447\u0435\u043c\u043e \u0435\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0439\u043e\u0433\u043e \u044f\u043a tar-\u0444\u0430\u0439\u043b. \u0426\u0435 \u043c\u043e\u0436\u043d\u0430 \u0437\u0440\u043e\u0431\u0438\u0442\u0438 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438 <code>docker save<\/code>.<\/p>\n\n\n\n<p><code>[root@docker ~]# docker save debian -o mydebian.tar<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">14. \u0415\u043a\u0441\u043f\u043e\u0440\u0442 \u0442\u0430 \u0456\u043c\u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432\/\u0437 tar-\u0430\u0440\u0445\u0456\u0432\u0443<\/h2>\n\n\n\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043c\u043e\u0436\u043d\u0430 \u0435\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b tar \u0437 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438 <code>docker export<\/code>. \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043d\u0438\u0436\u0447\u0435:<\/p>\n\n\n\n<p><code># Docker export container_name_or_id<\/code><\/p>\n\n\n\n<p>\u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0435\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 web_container \u0432 tar-\u0444\u0430\u0439\u043b.<\/p>\n\n\n\n<p><code>[root@docker ~]# docker export web_container -o&nbsp; web_container.tar<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>docker import<\/code> \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0456\u043c\u043f\u043e\u0440\u0442\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0437 \u0444\u0430\u0439\u043b\u0443 tar<\/p>\n\n\n\n<p><code>[root@docker ~]# docker import web_container.tar<br>sha256:254b1bdba79775191d33d221eb547e9caca161363639273103193919db71778d<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">15. \u0412\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0456\u0441\u0442\u043e\u0440\u0456\u0457 \u043e\u0431\u0440\u0430\u0437\u0443 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n\n\n\n<p>\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>docker history<\/code>, \u043c\u043e\u0436\u043d\u0430 \u043f\u043e\u0434\u0438\u0432\u0438\u0442\u0438\u0441\u044f, \u044f\u043a\u0456 \u043a\u043e\u043c\u0430\u043d\u0434\u0438 \u0432\u0438\u043a\u043e\u043d\u0443\u0432\u0430\u043b\u0438\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u0431\u0443\u0434\u043e\u0432\u0456 \u043e\u0431\u0440\u0430\u0437\u0443 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u044f\u043a \u043d\u0430 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u0456, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e\u043c\u0443 \u043d\u0438\u0436\u0447\u0435.<\/p>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<br><code># docker history {Image_Name_OR_Image_id}<\/code><\/p>\n\n\n\n<p><code>[root@docker ~]# docker history ubuntu:16.04<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">16. \u0412\u0438\u0442\u044f\u0433\u0443\u0432\u0430\u043d\u043d\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0456\u0432 \u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n\n\n\n<p>\u041c\u043e\u0436\u043d\u0430 \u0432\u0438\u0442\u044f\u0433\u0443\u0432\u0430\u0442\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0438 \u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456\u0432 \u0431\u0435\u0437 \u0432\u0445\u043e\u0434\u0443 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>docker logs<\/code><\/p>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<br><code># docker logs {container_name_or_container_id}<\/code><\/p>\n\n\n\n<p><code>[root@docker ~]# docker logs xibodocker_cms-web_1<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">17. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0456\u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n\n\n\n<p>\u0414\u043b\u044f \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0456\u0432 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u043e\u0440\u0430, \u043f\u0430\u043c&#8217;\u044f\u0442\u0456 \u0442\u0430 \u043c\u0435\u0440\u0435\u0436\u0435\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0443-\u0432\u0438\u0432\u043e\u0434\u0443 \u0432\u0441\u0456\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456\u0432 \u0437\u0430\u0441\u0442\u043e\u0441\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>docker stats<\/code><\/p>\n\n\n\n<p><code>[root@docker ~]# docker stats<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/2nYl9hVW0DWi8TTSL2Tgn2CeI3GOjeSfDryQAKePw3lxrB9eVOjrFOYiCUueyk3tSXnDNDsoVa_X7T3ku_e3N4q_kR_QOJTDYTFVmZz7hD_1gL5h3UPQBrw-n7JXOrtkQg6XayqW=s0\" alt=\"docker-stats-command-output-linux-1024x285\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">18. \u0412\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044f IP-\u0430\u0434\u0440\u0435\u0441\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n\n\n\n<p>\u0406\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u043f\u0440\u043e \u043d\u0438\u0437\u044c\u043a\u043e\u0440\u0456\u0432\u043d\u0435\u0432\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0454\u0442\u044c\u0441\u044f \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0438 <code>docker inspect<\/code>. \u041c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 IP-\u0430\u0434\u0440\u0435\u0441\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0437 \u0432\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0438. \u041f\u0440\u0438\u043a\u043b\u0430\u0434 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u043d\u0438\u0436\u0447\u0435.<\/p>\n\n\n\n<p><code>[root@docker ~]# docker inspect web_container | grep IPAddress | cut -d '\"' -f 4<br>172.17.0.3<br>172.17.0.3<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">19. \u0421\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043e\u0431\u0440\u0430\u0437\u0456\u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0456\u0432 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e Dockerfile<\/h2>\n\n\n\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>docker build<\/code> \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043e\u0431\u0440\u0430\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e DockerFile.<\/p>\n\n\n\n<p><code>[Root @ docker ~] # docker build -t mycentos: web1.<\/code><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u042f\u043a\u0449\u043e \u0412\u0430\u043c \u0446\u0456\u043a\u0430\u0432\u043e \u0434\u0456\u0437\u043d\u0430\u0442\u0438\u0441\u044f, \u0449\u043e \u0442\u0430\u043a\u0435 \u0432\u0440\u0430\u0437\u043b\u0438\u0432\u0456\u0441\u0442\u044c \u043d\u0443\u043b\u044c\u043e\u0432\u043e\u0433\u043e \u0434\u043d\u044f, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044c\u0442\u0435 \u043d\u0430 \u0441\u0442\u0430\u0442\u0442\u044e \u0432\u0456\u0434 IT Education Blog.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">20. \u0417\u0430\u0434\u0430\u0442\u0438 \u0442\u0435\u0433\/\u043d\u0430\u0437\u0432\u0443 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0437\u0443 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h2>\n\n\n\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>docker tag<\/code> \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0442\u0435\u0433\u0443 \u0430\u0431\u043e \u043d\u0430\u0437\u0432\u0438 \u043e\u0431\u0440\u0430\u0437\u0443&nbsp; Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0456\u0457.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u0414\u0456\u0437\u043d\u0430\u0442\u0438\u0441\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e <a href=\"https:\/\/itedu.center\/ua\/blog\/ratings\/7-distributions-linux-2022\/\" title=\"\" data-wpel-link=\"internal\">\u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0438 Linux 2022 <\/a>\u0440\u043e\u043a\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442\u0456 IT Education Blog.<\/p>\n<\/blockquote>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<br><code># tag docker source_image {: tag} target_image {: tag}<\/code><\/p>\n\n\n\n<p>\u041f\u0440\u0438\u043f\u0443\u0441\u0442\u0438\u043c\u043e, \u043c\u0438 \u0445\u043e\u0447\u0435\u043c\u043e \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0438 \u043d\u0430\u0437\u0432\u0443 \u043e\u0431\u0440\u0430\u0437\u0443 &#8216;centos: 7&#8217; \u044f\u043a &#8216;myCentOS7: v1<\/p>\n\n\n\n<p><code>[root@docker ~]# docker tag centos:7 mycentos7:v1<br>[root@docker ~]#<\/code><\/p>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440 \u043e\u0431\u0440\u0430\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043c\u0430\u0454 \u043d\u0430\u0437\u0432\u0443<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/ksk4zMrJtlYqvpuzLfGJgTtXhivHbC0t5H2hDDX3kq2Pr_l7hQRTRfZC96GxfTatLUFR4d0KV1g-h9aGrHHHQVNuv6KeMz09x9j4I5q96kSvfutygm6t64IHqXsXNaYR4ceKj6uK=s0\" alt=\"docker-tag-linux\"\/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u0414\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0442\u0430 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f Docker \u0432\u0438\u0432\u0447\u0430\u0439\u0442\u0435 \u043d\u0430 \u043d\u0430\u0448\u043e\u043c\u0443 <a href=\"https:\/\/itedu.center\/ua\/courses\/administruvannia-docker\/\" target=\"_blank\" rel=\"noopener\" title=\"https:\/\/itedu.center\/ua\/courses\/administruvannia-docker\/\" data-wpel-link=\"internal\">\u043a\u0443\u0440\u0441\u0456 \u0410\u0434\u043c\u0456\u043d\u0456\u0441\u0442\u0440\u0443\u0432\u0430\u043d\u043d\u044f Docker<\/a><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Docker Container \u2014 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0456\u044f, \u044f\u043a\u0430 \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441 \u0440\u043e\u0437\u0433\u043e\u0440\u0442\u0430\u043d\u043d\u044f \u0442\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0456\u043d\u043d\u044f \u0434\u043e\u0434\u0430\u0442\u043a\u0430\u043c\u0438 \u0432 \u0441\u0435\u0440\u0435\u0434\u043e\u0432\u0438\u0449\u0456 \u0432\u0456\u0440\u0442\u0443\u0430\u043b\u0456\u0437\u0430\u0446\u0456\u0457 \u043d\u0430 \u0440\u0456\u0432\u043d\u0456 \u043e\u043f\u0435\u0440\u0430\u0446\u0456\u0439\u043d\u043e\u0457 \u0441\u0438\u0441\u0442\u0435\u043c\u0438. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0442\u044c\u0441\u044f \u0434\u043b\u044f CI\/CD \u0441\u0438\u0441\u0442\u0435\u043c. \u0423 \u0441\u0442\u0430\u0442\u0442\u0456 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e 20 \u043d\u0430\u0439\u0447\u0430\u0441\u0442\u0456\u0448\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u043d\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 Docker \u043d\u0430 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u0456 Linux-\u0441\u0438\u0441\u0442\u0435\u043c. 1. \u041f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0456\u0457 Docker \u041f\u0435\u0440\u0448 \u043d\u0456\u0436 \u0441\u0442\u0430\u0432\u0430\u0442\u0438 \u0434\u043e \u0440\u043e\u0431\u043e\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0437\u043d\u0430\u0442\u0438, \u044f\u043a\u0430 \u0432\u0435\u0440\u0441\u0456\u044f Docker \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f. \u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043d\u044c\u043e \u0432\u0432\u0435\u0441\u0442\u0438: [root@docker ~]# docker &#8211;versionDocker&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[108],"tags":[71,15],"class_list":["post-1213","post","type-post","status-publish","format-standard","hentry","category-ratings","tag-docker","tag-linux"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"uk","enabled_languages":["uk"],"languages":{"uk":{"title":true,"content":true,"excerpt":false}}},"acf":[],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/posts\/1213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/comments?post=1213"}],"version-history":[{"count":60,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/posts\/1213\/revisions"}],"predecessor-version":[{"id":35704,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/posts\/1213\/revisions\/35704"}],"wp:attachment":[{"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/media?parent=1213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/categories?post=1213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/tags?post=1213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}