{"id":269464,"date":"2015-12-02T12:44:02","date_gmt":"2015-12-02T09:44:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269464"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269464","title":{"rendered":"\u041e\u0431\u0440\u0430\u0437\u044b \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b Docker \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445"},"content":{"rendered":"<p>       <i>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u043e\u0441\u0442\u0430 <a href=\"http:\/\/merrigrove.blogspot.co.uk\/2015\/10\/visualizing-docker-containers-and-images.html\">Visualizing Docker Containers and Images<\/a>, \u043e\u0442 \u043d\u043e\u0432\u0438\u0447\u043a\u0430 \u043a \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c, \u0430\u0432\u0442\u043e\u0440 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 docker.<\/i><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Docker \u0438\u043b\u0438 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u043e\u043d \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438 \u0438\u043b\u0438 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 configuration management, \u0442\u043e \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c.<\/p>\n<p>  \u041f\u043e\u0441\u0442 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u0432\u043e\u0438\u0442\u044c docker cli, \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u043e\u0431\u0440\u0430\u0437. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8ff\/349\/fb2\/8ff349fb23f840589c479d029964b8dc.png\" alt=\"docker container\"\/><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0436\u0430\u0449\u0438\u0435 \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043b\u043e\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b UnionFS. \u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0430\u0440\u044b \u043d\u0435\u0434\u0435\u043b\u044c \u044f \u0438\u0437\u0443\u0447\u0430\u043b \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e, \u044f \u043d\u043e\u0432\u0438\u0447\u043e\u043a \u0432 \u043c\u0438\u0440\u0435 docker, \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 docker \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043d\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0434\u043b\u044f \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041f\u043e-\u043c\u043e\u0435\u043c\u0443, \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u2014 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0427\u0430\u0441\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0439 \u0438 \u043f\u0440\u0438\u0432\u043d\u043e\u0441\u0438\u0442 \u043d\u043e\u0432\u044b\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u0438 \u043c\u0435\u0442\u0430\u0444\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0431\u044b \u043f\u043e\u043d\u044f\u0442\u043d\u044b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u043d\u043e \u0431\u0435\u0437 \u0447\u0435\u0442\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u044f\u044e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0425\u043e\u0440\u043e\u0448\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Git. \u042f \u043d\u0435 \u043c\u043e\u0433 \u043f\u043e\u043d\u044f\u0442\u044c Git, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043d\u044f\u043b \u0435\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0432\u043a\u043b\u044e\u0447\u0430\u044f trees, blobs, commits, tags, tree-ish \u0438 \u043f\u0440\u043e\u0447\u0435\u0435. \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043b\u044e\u0434\u0438, \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Git, \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043c\u0430\u0441\u0442\u0435\u0440\u0441\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n<h4>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u0430 (Image)<\/h4>\n<p>  \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0438\u0436\u0435 \u0432 \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u0430\u0445. \u041e\u0431\u0440\u0430\u0437 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u043a \u00ab\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u00bb \u0438\u043b\u0438 \u00ab\u043e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434\u00bb (union view) \u0441\u0442\u0435\u043a\u0430 \u0441\u043b\u043e\u0435\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/243\/a01\/1ed\/243a011ed04f455099a4ba64a87736f6.png\" alt=\"docker_image\"\/><\/p>\n<p>  \u0421\u043b\u0435\u0432\u0430 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0441\u0442\u0435\u043a \u0441\u043b\u043e\u0435\u0432 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f. \u041e\u043d\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043e\u043d\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043d\u0430 \u0445\u043e\u0441\u0442-\u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0412\u0430\u0436\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f (\u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b), \u0430 \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0441\u043b\u043e\u0435 \u0441\u0442\u0435\u043a\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0442\u043e\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0438 \u0438.\u0434. \u0421\u043b\u043e\u0439 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043a\u0430\u043a UnionFS (AUFS \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 docker) \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0432\u0438\u0434\u0435 \u0435\u0434\u0438\u043d\u043e\u0439 read-only \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u044b \u0432\u0441\u0435 \u0441\u043b\u043e\u0438. \u041c\u044b \u0432\u0438\u0434\u0438\u043c \u044d\u0442\u0443 \u00ab\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u00bb \u043e\u0431\u0440\u0430\u0437\u0430 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0441\u043f\u0440\u0430\u0432\u0430.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u044d\u0442\u0438 \u0441\u043b\u043e\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0438\u0445 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0430 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0435. \u041e\u043d\u0438 \u043d\u0435 \u0432\u0438\u0434\u043d\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u041d\u0430 \u043c\u043e\u0435\u0439 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0435 \u044f \u043c\u043e\u0433\u0443 \u043d\u0430\u0439\u0442\u0438 \u043e\u0431\u0440\u0430\u0437\u044b \u0432 \/var\/lib\/docker\/aufs.<\/p>\n<pre><code class=\"bash\"># sudo tree -L 1 \/var\/lib\/docker\/ \/var\/lib\/docker\/ \u251c\u2500\u2500 aufs \u251c\u2500\u2500 containers \u251c\u2500\u2500 graph \u251c\u2500\u2500 init \u251c\u2500\u2500 linkgraph.db \u251c\u2500\u2500 repositories-aufs \u251c\u2500\u2500 tmp \u251c\u2500\u2500 trust \u2514\u2500\u2500 volumes  7 directories, 2 files <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 (Container)<\/h4>\n<p>  \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u00ab\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e\u00bb \u0441\u0442\u0435\u043a\u0430 \u0441\u043b\u043e\u0435\u0432 \u0441 \u0432\u0435\u0440\u0445\u043d\u0438\u043c \u0441\u043b\u043e\u0435\u043c \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8d3\/d29\/494\/8d3d29494dbf46f79b1be15cea7516c4.png\" alt=\"docker_container\"\/><\/p>\n<p>  \u041d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0432\u044b\u0448\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043f\u0440\u043e \u043e\u0431\u0440\u0430\u0437, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0441\u043b\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438. \u0412\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438\u043b\u0438 \u043d\u0435\u0442 \u0438 \u044d\u0442\u043e \u043d\u0435\u0441\u043f\u0440\u043e\u0441\u0442\u0430. \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043d\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0438 \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043b\u043e \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0443 \u0432 \u043c\u043e\u0435\u043c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438.<\/p>\n<p>  \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043b\u0438\u0448\u044c \u0441\u043b\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430\u0432\u0435\u0440\u0445\u0443 \u043e\u0431\u0440\u0430\u0437\u0430 (\u0441\u0442\u0435\u043a\u0430 \u0441\u043b\u043e\u0435\u0432 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f). \u041e\u043d \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d.<\/p>\n<h4>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h4>\n<p>  \u0417\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u2014 \u044d\u0442\u043e \u00ab\u043e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434\u00bb \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f-\u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0435\u0433\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u041d\u0438\u0436\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c72\/5d3\/b0b\/c725d3b0be5742aca5f50310d640d0b1.png\" alt=\"docker_container_running\"\/><\/p>\n<p>  \u0418\u0437\u043e\u043b\u044f\u0446\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438 \u0443\u0440\u043e\u0432\u043d\u044f \u044f\u0434\u0440\u0430, cgroups, namespaces \u0438 \u0434\u0440\u0443\u0433\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0434\u043e\u043a\u0435\u0440\u0443 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439. \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043c\u043e\u0433\u0443\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c, \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0441\u043b\u043e\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438. \u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f8e\/bbf\/e3b\/f8ebbfe3b59346ee9cdb017b89fcb169.png\" alt=\"docker_touch_file\"\/><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u043e, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0435:<\/p>\n<pre><code class=\"bash\">docker run ubuntu touch happiness.txt <\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u0441\u043b\u043e\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0435, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d.<\/p>\n<pre><code class=\"bash\"># find \/ -name happiness.txt \/var\/lib\/docker\/aufs\/diff\/860a7b...889\/happiness.txt <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u044f \u043e\u0431\u0440\u0430\u0437\u0430 (Image layer)<\/h4>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u043b\u043e\u0439 \u043e\u0431\u0440\u0430\u0437\u0430. \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0439 \u043e\u0431\u0440\u0430\u0437\u0430 \u0438 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0441\u043b\u043e\u0439 \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/928\/23a\/1a0\/92823a1a03ad487586293f37e78cf74f.png\" alt=\"docker_layer\"\/><\/p>\n<p>  \u041c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043b\u043e\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u043a\u0435\u0440\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438. \u041e\u0431\u0430 \u0432\u0438\u0434\u0430 \u0441\u043b\u043e\u0435\u0432 (\u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438) \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b7e\/d04\/252\/b7ed042525f647b986009b82d18b3fee.png\" alt=\"docker_container_metadata\"\/><\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f id (\u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0441\u043b\u043e\u0438 \u0432\u043d\u0438\u0437\u0443). \u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u0439 \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0439, \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d \u043d\u0430\u0432\u0435\u0440\u0445\u0443 \u0441\u0442\u0435\u043a\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7e9\/de2\/c4f\/7e9de2c4f537438c8f5357d09c398289.png\" alt=\"docker_image_metadata\"\/><\/p>\n<h5>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445<\/h5>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 (\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 docker \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0437\u0436\u0435 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e), \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0435\u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 (\u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f) \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u00abjson\u00bb \u0432 \u043f\u0430\u043f\u043a\u0435 \/var\/lib\/docker\/graph\/id_\u0441\u043b\u043e\u044f:<\/p>\n<pre><code class=\"bash\">\/var\/lib\/docker\/graph\/e809f156dc985...\/json <\/code><\/pre>\n<p>  \u0433\u0434\u0435 \u00abe809f156dc985&#8230;\u00bb \u2014 \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0439 id \u0441\u043b\u043e\u044f.<\/p>\n<h4>\u0421\u0432\u044f\u0436\u0435\u043c \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438.<\/p>\n<h5><b>docker create &lt;image-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/71a\/d30\/a1e\/71ad30a1e0b04cb09db3e25c741ef7a8.png\" alt=\"docker create input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/bdc\/1cc\/f14\/bdc1ccf14b1c4702afe71cbd27a1574b.png\" alt=\"docker create output\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker create&#8217; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430\u0432\u0435\u0440\u0445 \u0441\u0442\u0435\u043a\u0430 \u0441\u043b\u043e\u0435\u0432, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e &lt;image-id&gt;. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/12c\/8d5\/606\/12c8d56068c5416e8ca003b532ef3cdb.png\" alt=\"docker create\"\/><\/p>\n<h5><b>docker start &lt;container-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/bdc\/1cc\/f14\/bdc1ccf14b1c4702afe71cbd27a1574b.png\" alt=\"docker create output\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/730\/6c4\/4cd\/7306c44cdfdd4ead9f1f073d91dd312c.png\" alt=\"docker start output\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker start&#8217; \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u043b\u043e\u0435\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0430 \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<h5><b>docker run &lt;image-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/71a\/d30\/a1e\/71ad30a1e0b04cb09db3e25c741ef7a8.png\" alt=\"docker run input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/730\/6c4\/4cd\/7306c44cdfdd4ead9f1f073d91dd312c.png\" alt=\"docker run output\"\/><\/p>\n<p>  \u041e\u0434\u0438\u043d \u0438\u0437 \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u044e\u0442 \u043b\u044e\u0434\u0438 (\u044f \u0442\u043e\u0436\u0435 \u0437\u0430\u0434\u0430\u0432\u0430\u043b): \u00ab\u0412 \u0447\u0435\u043c \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 &#8216;docker start&#8217; \u0438 &#8216;docker run&#8217;?\u00bb \u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u2014 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/429\/f39\/fc6\/429f39fc67d44579a40365018dc6839e.png\" alt=\"docker run\"\/><\/p>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker run&#8217; \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0437, \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0432\u0435\u0440\u0445 \u043d\u0435\u0433\u043e \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u042d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438 \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0434\u0435\u0442\u0430\u043b\u0438 \u0434\u0432\u0443\u0445 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0435\u043c Git, \u044f \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e &#8216;docker run&#8217; \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 &#8216;git pull&#8217;. \u0422\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 &#8216;git pull&#8217; (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 &#8216;git fetch&#8217; \u0438 &#8216;git merge&#8217;), \u043a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker run&#8217; \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0434\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043c\u043e\u0436\u0435\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<h5><b>docker ps<\/b><\/h5>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/441\/0ed\/8b7\/4410ed8b7bb94de68dfae60a79a08aca.png\" alt=\"docker ps\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker ps&#8217; \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043d\u0430 \u0432\u0430\u0448\u0435\u0439 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0435. \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0445\u043e\u0434\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0441\u043a\u0440\u044b\u0442\u044b. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<\/p>\n<h5><b>docker ps -a<\/b><\/h5>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/633\/55a\/c1a\/63355ac1a27d4cf6a1f10142cc89d7b0.png\" alt=\"docker ps -a\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker ps -a&#8217;, \u0433\u0434\u0435 &#8216;a&#8217; \u2014 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 &#8216;all&#8217; \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f.<\/p>\n<h5><b>docker images<\/b><\/h5>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2d2\/29e\/bc6\/2d229ebc667244b3b478298aa3162c7e.png\" alt=\"image\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker images&#8217; \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (top-level images). \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0437 \u043e\u0442 \u0441\u043b\u043e\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f. \u0422\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u043e\u0431\u0440\u0430\u0437\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u043b\u0438 \u0442\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e pull, \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u042d\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0435\u0432.<\/p>\n<h5><b>docker images -a<\/b><\/h5>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/5b6\/6a9\/fd9\/5b66a9fd93ce4157b3cfa48984a5ca0d.png\" alt=\"docker images -a\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker images -a&#8217; \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0441\u0435 \u043e\u0431\u0440\u0430\u0437\u044b \u043d\u0430 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0435. \u042d\u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u043b\u043e\u0435\u0432 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u0441\u043b\u043e\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 &#8216;docker history&#8217;.<\/p>\n<h5><b>docker stop &lt;container-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f34\/430\/e32\/f34430e3231842e3b748d337993e9338.png\" alt=\"docker stop input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/bdc\/1cc\/f14\/bdc1ccf14b1c4702afe71cbd27a1574b.png\" alt=\"docker stop output\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker stop&#8217; \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b SIGTERM \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443, \u0447\u0442\u043e \u043c\u044f\u0433\u043a\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<h5><b>docker kill &lt;container-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ef8\/c77\/3c3\/ef8c773c34454292b76f798482e15463.png\" alt=\"docker kill input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/bdc\/1cc\/f14\/bdc1ccf14b1c4702afe71cbd27a1574b.png\" alt=\"docker kill output\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker kill&#8217; \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b SIGKILL, \u0447\u0442\u043e \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u042d\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u043d\u0430\u0436\u0430\u0442\u044c Ctrl+\\ \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<\/p>\n<h5><b>docker pause &lt;container-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/63d\/de7\/ed4\/63dde7ed482544e0afcc2925eabc1e3d.png\" alt=\"docker pause input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/70d\/208\/439\/70d208439a1944739c5e06e716ab1975.png\" alt=\"docker pause output\"\/><\/p>\n<p>  \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 &#8216;docker stop&#8217; \u0438 &#8216;docker kill&#8217;, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435 UNIX \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker pause&#8217; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c cgroups \u0434\u043b\u044f \u0437\u0430\u043c\u043e\u0440\u043e\u0437\u043a\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/cgroups\/freezer-subsystem.txt\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0435\u0441\u043b\u0438 \u0432\u043a\u0440\u0430\u0442\u0446\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 Ctrl+Z (SIGTSTP) \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u043e\u0440\u043e\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<h5><b>docker rm &lt;container-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/92d\/14d\/d92\/92d14dd9224043079a90ab80c4dbc6a6.png\" alt=\"docker rm input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a36\/292\/8c4\/a362928c4661422797d267560ff38182.png\" alt=\"docker rm output\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker rm&#8217; \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430 \u0445\u043e\u0441\u0442-\u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0414\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043d\u0430 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445. \u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<h5><b>docker rmi &lt;container-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4c2\/eb5\/26a\/4c2eb526a35e4751a5302c954370a0fa.png\" alt=\"docker rmi input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3a2\/145\/38a\/3a214538a6e54e009f704825109393a1.png\" alt=\"docker rmi output\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker rmi&#8217; \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0439 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u00ab\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u00bb \u043e\u0431\u0440\u0430\u0437\u0430. \u041e\u043d\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0437 \u0441 \u0445\u043e\u0441\u0442-\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043d\u043e \u043e\u0431\u0440\u0430\u0437 \u0432\u0441\u0435 \u0435\u0449\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0447\u0435\u0440\u0435\u0437 &#8216;docker pull&#8217;. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &#8216;docker rmi&#8217; \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u043b\u043e\u0435\u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (\u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432), \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043b\u043e\u0435\u0432 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &#8216;docker rmi -f&#8217;.<\/p>\n<h5><b>docker commit &lt;container-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7d0\/ec4\/104\/7d0ec41049b34238bb785e28897e28f0.png\" alt=\"docker commit running container\"\/> \u0438\u043b\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/325\/e8e\/270\/325e8e27098e4cdeb956634361879388.png\" alt=\"docker commit container\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/daa\/69c\/50f\/daa69c50fbc3479ba9d6497983b73a02.png\" alt=\"docker commited layer\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker commit&#8217; \u0431\u0435\u0440\u0435\u0442 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u0442\u043e\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 \u0441\u043b\u043e\u0439 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 (\u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u043e\u043d) \u0432 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0439 \u043e\u0431\u0440\u0430\u0437.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e3d\/7d7\/766\/e3d7d7766165425a9148ac61369ffe9c.png\" alt=\"docker commit\"\/><\/p>\n<h5><b>docker build<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  Dockerfile <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/847\/71b\/87a\/84771b87a8cd4d77b63d39a3ae9dae13.png\" alt=\"dockerfile\"\/> \u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/71a\/d30\/a1e\/71ad30a1e0b04cb09db3e25c741ef7a8.png\" alt=\"docker image\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/71a\/d30\/a1e\/71ad30a1e0b04cb09db3e25c741ef7a8.png\" alt=\"docker image\"\/><br \/>  \u0421\u043e \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u044f\u043c\u0438.<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker build&#8217; \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u0440\u044f\u0434 \u043a\u043e\u043c\u0430\u043d\u0434:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b25\/36e\/cac\/b2536ecac84148ba9a043bb00fe3ce5a.png\" alt=\"docker build\"\/><\/p>\n<p>  \u041d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0432\u044b\u0448\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043a\u0430\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430 build \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 FROM \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 Dockerfile \u043a\u0430\u043a \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e:<\/p>\n<p>  1) \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 (create \u0438 start)<br \/>  2) \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043b\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438<br \/>  3) \u0434\u0435\u043b\u0430\u0435\u0442 commit<br \/>  \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0439. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 &#8216;docker build&#8217; \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0435\u0432.<\/p>\n<h5><b>docker exec &lt;running-container-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7d0\/ec4\/104\/7d0ec41049b34238bb785e28897e28f0.png\" alt=\"docker running container\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4d6\/cd5\/21e\/4d6cd521ee4d47e68d89e9ce77c8a6ca.png\" alt=\"docker exec\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker exec&#8217; \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<h5><b>docker inspect &lt;container-id&gt; | &lt;image-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/74c\/7ee\/e53\/74c7eee53b8f4ed8a2a606e87571fe3a.png\" alt=\"docker inspect container\"\/> \u0438\u043b\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/242\/b58\/b68\/242b58b68acd4580b226569d81d613e5.png\" alt=\"docker inspect image\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/898\/5e8\/e54\/8985e8e5467a42769988a4351d0c0828.png\" alt=\"metadata\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker inspect&#8217; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0441\u043b\u043e\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0437\u0430.<\/p>\n<h5><b>docker save &lt;image-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f2a\/b8d\/70d\/f2ab8d70de7a4ca4959f6a7bf1fb11e3.png\" alt=\"docker save input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d5d\/bf7\/3f0\/d5dbf73f0f2d4d72b0ed38309e2c6a6b.png\" alt=\"docker save output\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker save&#8217; \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043e\u0431\u0440\u0430\u0437\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0445\u043e\u0441\u0442-\u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b &#8216;export&#8217;, \u043e\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0441\u043b\u043e\u0438 \u0438 \u0438\u0445 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u043e\u0431\u0440\u0430\u0437\u0430\u043c.<\/p>\n<h5><b>docker export &lt;container-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a7f\/3f4\/717\/a7f3f47170084dc2b75dd73e8d6a5cbb.png\" alt=\"docker export input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/36d\/807\/ed6\/36d807ed6b304333b31f658dfb5c4326.png\" alt=\"docker export output\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker export&#8217; \u0441\u043e\u0437\u0434\u0430\u0435\u0442 tar \u0430\u0440\u0445\u0438\u0432 \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430, \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u0430\u044f \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0435 docker. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u043b\u043e\u0438 \u0438 \u0438\u0445 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.<\/p>\n<h5><b>docker history &lt;image-id&gt;<\/b><\/h5>\n<p>  \u0414\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/428\/150\/afc\/428150afc2574fd2bf32f1202c908f77.png\" alt=\"docker history input\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e82\/45f\/511\/e8245f51120340b19e07c6009f2d4ce8.png\" alt=\"docker history output\"\/><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 &#8216;docker history&#8217; \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 &lt;image-id&gt; \u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u043b\u043e\u0435\u0432-\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u043e\u0431\u0440\u0430\u0437\u0430 (\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438)<\/p>\n<h4>\u0418\u0442\u043e\u0433<\/h4>\n<p>  \u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432. \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 (pull, search, restart, attach \u0438 \u0434\u0440\u0443\u0433\u0438\u0435), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u043b\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u044b \u043c\u043e\u0438\u043c\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c\u0438.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/272145\/\"> http:\/\/habrahabr.ru\/post\/272145\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <i>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u043e\u0441\u0442\u0430 <a href=\"http:\/\/merrigrove.blogspot.co.uk\/2015\/10\/visualizing-docker-containers-and-images.html\">Visualizing Docker Containers and Images<\/a>, \u043e\u0442 \u043d\u043e\u0432\u0438\u0447\u043a\u0430 \u043a \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c, \u0430\u0432\u0442\u043e\u0440 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 docker.<\/i><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Docker \u0438\u043b\u0438 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u043e\u043d \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438 \u0438\u043b\u0438 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 configuration management, \u0442\u043e \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c.<\/p>\n<p>  \u041f\u043e\u0441\u0442 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0441\u0432\u043e\u0438\u0442\u044c docker cli, \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u043e\u0431\u0440\u0430\u0437. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c.  <\/p>\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-269464","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269464","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=269464"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269464\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}