{"id":307111,"date":"2020-07-17T15:00:49","date_gmt":"2020-07-17T15:00:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=307111"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=307111","title":{"rendered":"\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 (\u043e\u0442 docker run \u0434\u043e runc)"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/511414\/\"><b><i>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 <a href=\"https:\/\/otus.pw\/pob3\/\">\u00ab\u0418\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Kubernetes\u00bb<\/a>.<\/i><\/b><\/p>\n<hr>\n<p>  \u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043d\u0435\u043c\u0430\u043b\u043e \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b Linux-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <code>docker run<\/code>. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u0440\u0435\u0437\u044e\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b, \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0446\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443. \u041d\u0430\u0447\u043d\u0435\u043c \u043c\u044b \u043d\u0430\u0448\u0435 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 alpine \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker run:<\/p>\n<pre><code class=\"go\">$ docker run -i -t --name alpine alpine ash<\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u043d\u0438\u0436\u0435. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 docker run, \u043e\u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0435\u0439 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 JSON \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c docker. \u0417\u0430\u0442\u0435\u043c \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u043c\u043e\u043d\u0443 docker \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0435\u0442 \u0434\u043e\u043c\u0435\u043d\u0430 UNIX \/var\/run\/docker.sock. \u0414\u043b\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0437\u0430 <a href=\"https:\/\/docs.docker.com\/engine\/api\/v1.26\/\">\u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 API<\/a> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <i>strace<\/i>:<a name=\"habracut\"><\/a><\/p>\n<pre><code class=\"go\">$ strace -s 8192 -e trace=read,write -f docker run -d alpine<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">[pid 13446] write(3, &quot;GET \/_ping HTTP\/1.1\\r\\nHost: docker\\r\\nUser-Agent: Docker-Client\/1.13.1 (linux)\\r\\n\\r\\n&quot;, 79) = 79 [pid 13442] read(3, &quot;HTTP\/1.1 200 OK\\r\\nApi-Version: 1.26\\r\\nDocker-Experimental: false\\r\\nServer: Docker\/1.13.1 (linux)\\r\\nDate: Mon, 19 Feb 2018 16:12:32 GMT\\r\\nContent-Length: 2\\r\\nContent-Type: text\/plain; charset=utf-8\\r\\n\\r\\nOK&quot;, 4096) = 196 [pid 13442] write(3, &quot;POST \/v1.26\/containers\/create HTTP\/1.1\\r\\nHost: docker\\r\\nUser-Agent: Docker-Client\/1.13.1 (linux)\\r\\nContent-Length: 1404\\r\\nContent-Type: application\/json\\r\\n\\r\\n{\\&quot;Hostname\\&quot;:\\&quot;\\&quot;,\\&quot;Domainname\\&quot;:\\&quot;\\&quot;,\\&quot;User\\&quot;:\\&quot;\\&quot;,\\&quot;AttachStdin\\&quot;:false,\\&quot;AttachStdout\\&quot;:false,\\&quot;AttachStderr\\&quot;:false,\\&quot;Tty\\&quot;:false,\\&quot;OpenStdin\\&quot;:false,\\&quot;StdinOnce\\&quot;:false,\\&quot;Env\\&quot;:[],\\&quot;Cmd\\&quot;:null,\\&quot;Image\\&quot;:\\&quot;alpine\\&quot;,\\&quot;Volumes\\&quot;:{},\\&quot;WorkingDir\\&quot;:\\&quot;\\&quot;,\\&quot;Entrypoint\\&quot;:null,\\&quot;OnBuild\\&quot;:null,\\&quot;Labels\\&quot;:{},\\&quot;HostConfig\\&quot;:{\\&quot;Binds\\&quot;:null,\\&quot;ContainerIDFile\\&quot;:\\&quot;\\&quot;,\\&quot;LogConfig\\&quot;:{\\&quot;Type\\&quot;:\\&quot;\\&quot;,\\&quot;Config\\&quot;:{}},\\&quot;NetworkMode\\&quot;:\\&quot;default\\&quot;,\\&quot;PortBindings\\&quot;:{},\\&quot;RestartPolicy\\&quot;:{\\&quot;Name\\&quot;:\\&quot;no\\&quot;,\\&quot;MaximumRetryCount\\&quot;:0},\\&quot;AutoRemove\\&quot;:false,\\&quot;VolumeDriver\\&quot;:\\&quot;\\&quot;,\\&quot;VolumesFrom\\&quot;:null,\\&quot;CapAdd\\&quot;:null,\\&quot;CapDrop\\&quot;:null,\\&quot;Dns\\&quot;:[],\\&quot;DnsOptions\\&quot;:[],\\&quot;DnsSearch\\&quot;:[],\\&quot;ExtraHosts\\&quot;:null,\\&quot;GroupAdd\\&quot;:null,\\&quot;IpcMode\\&quot;:\\&quot;\\&quot;,\\&quot;Cgroup\\&quot;:\\&quot;\\&quot;,\\&quot;Links\\&quot;:null,\\&quot;OomScoreAdj\\&quot;:0,\\&quot;PidMode\\&quot;:\\&quot;\\&quot;,\\&quot;Privileged\\&quot;:false,\\&quot;PublishAllPorts\\&quot;:false,\\&quot;ReadonlyRootfs\\&quot;:false,\\&quot;SecurityOpt\\&quot;:null,\\&quot;UTSMode\\&quot;:\\&quot;\\&quot;,\\&quot;UsernsMode\\&quot;:\\&quot;\\&quot;,\\&quot;ShmSize\\&quot;:0,\\&quot;ConsoleSize\\&quot;:[0,0],\\&quot;Isolation\\&quot;:\\&quot;\\&quot;,\\&quot;CpuShares\\&quot;:0,\\&quot;Memory\\&quot;:0,\\&quot;NanoCpus\\&quot;:0,\\&quot;CgroupParent\\&quot;:\\&quot;\\&quot;,\\&quot;BlkioWeight\\&quot;:0,\\&quot;BlkioWeightDevice\\&quot;:null,\\&quot;BlkioDeviceReadBps\\&quot;:null,\\&quot;BlkioDeviceWriteBps\\&quot;:null,\\&quot;BlkioDeviceReadIOps\\&quot;:null,\\&quot;BlkioDeviceWriteIOps\\&quot;:null,\\&quot;CpuPeriod\\&quot;:0,\\&quot;CpuQuota\\&quot;:0,\\&quot;CpuRealtimePeriod\\&quot;:0,\\&quot;CpuRealtimeRuntime\\&quot;:0,\\&quot;CpusetCpus\\&quot;:\\&quot;\\&quot;,\\&quot;CpusetMems\\&quot;:\\&quot;\\&quot;,\\&quot;Devices\\&quot;:[],\\&quot;DiskQuota\\&quot;:0,\\&quot;KernelMemory\\&quot;:0,\\&quot;MemoryReservation\\&quot;:0,\\&quot;MemorySwap\\&quot;:0,\\&quot;MemorySwappiness\\&quot;:-1,\\&quot;OomKillDisable\\&quot;:false,\\&quot;PidsLimit\\&quot;:0,\\&quot;Ulimits\\&quot;:null,\\&quot;CpuCount\\&quot;:0,\\&quot;CpuPercent\\&quot;:0,\\&quot;IOMaximumIOps\\&quot;:0,\\&quot;IOMaximumBandwidth\\&quot;:0},\\&quot;NetworkingConfig\\&quot;:{\\&quot;EndpointsConfig\\&quot;:{}}}\\n&quot;, 1556) = 1556 [pid 13442] read(3, &quot;HTTP\/1.1 201 Created\\r\\nApi-Version: 1.26\\r\\nContent-Type: application\/json\\r\\nDocker-Experimental: false\\r\\nServer: Docker\/1.13.1 (linux)\\r\\nDate: Mon, 19 Feb 2018 16:12:32 GMT\\r\\nContent-Length: 90\\r\\n\\r\\n{\\&quot;Id\\&quot;:\\&quot;b70b57c5ae3e25585edba898ac860e388582391907be4070f91eb49f4db5c433\\&quot;,\\&quot;Warnings\\&quot;:null}\\n&quot;, 4096) = 281<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0443\u0442 \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0435\u0441\u0435\u043b\u044c\u0435. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u043c\u043e\u043d docker \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u043e\u043d \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u0438 \u0441\u0432\u044f\u0436\u0435\u0442\u0441\u044f \u0441 <a href=\"https:\/\/containerd.io\/\">containerd<\/a> \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/containerd\/containerd\/tree\/master\/api\">gRPC API<\/a> \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 (\u0438\u043b\u0438 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f) \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u0414\u043b\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0437\u0430 \u044d\u0442\u0438\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 ctr:<\/p>\n<pre><code class=\"go\">$ ctr --address &quot;unix:\/\/\/run\/containerd.sock&quot; events<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">TIME                           TYPE                           ID                             PID                            STATUS time=&quot;2018-02-19T12:10:07.658081859-05:00&quot; level=debug msg=&quot;Calling POST \/v1.26\/containers\/create&quot;  time=&quot;2018-02-19T12:10:07.676706130-05:00&quot; level=debug msg=&quot;container mounted via layerStore: \/var\/lib\/docker\/overlay2\/2beda8ac904f4a2531d72e1e3910babf145c6e68dfd02008c58786adb254f9dc\/merged&quot;  time=&quot;2018-02-19T12:10:07.682430843-05:00&quot; level=debug msg=&quot;Calling POST \/v1.26\/containers\/d1a6d87886e2d515bfff37d826eeb671502fa7c6f47e422ec3b3549ecacbc15f\/attach?stderr=1&amp;stdin=1&amp;stdout=1&amp;stream=1&quot;  time=&quot;2018-02-19T12:10:07.683638676-05:00&quot; level=debug msg=&quot;Calling GET \/v1.26\/events?filters=%7B%22container%22%3A%7B%22d1a6d87886e2d515bfff37d826eeb671502fa7c6f47e422ec3b3549ecacbc15f%22%3Atrue%7D%2C%22type%22%3A%7B%22container%22%3Atrue%7D%7D&quot;  time=&quot;2018-02-19T12:10:07.684447919-05:00&quot; level=debug msg=&quot;Calling POST \/v1.26\/containers\/d1a6d87886e2d515bfff37d826eeb671502fa7c6f47e422ec3b3549ecacbc15f\/start&quot;  time=&quot;2018-02-19T12:10:07.687230717-05:00&quot; level=debug msg=&quot;container mounted via layerStore: \/var\/lib\/docker\/overlay2\/2beda8ac904f4a2531d72e1e3910babf145c6e68dfd02008c58786adb254f9dc\/merged&quot;  time=&quot;2018-02-19T12:10:07.885362059-05:00&quot; level=debug msg=&quot;sandbox set key processing took 11.824662ms for container d1a6d87886e2d515bfff37d826eeb671502fa7c6f47e422ec3b3549ecacbc15f&quot;  time=&quot;2018-02-19T12:10:07.927897701-05:00&quot; level=debug msg=&quot;libcontainerd: received containerd event: &amp;types.Event{Type:\\&quot;start-container\\&quot;, Id:\\&quot;d1a6d87886e2d515bfff37d826eeb671502fa7c6f47e422ec3b3549ecacbc15f\\&quot;, Status:0x0, Pid:\\&quot;\\&quot;, Timestamp:(*timestamp.Timestamp)(0xc420bacdd0)}&quot;  2018-02-19T17:10:07.927795344Z start-container                d1a6d87886e2d515bfff37d826eeb671502fa7c6f47e422ec3b3549ecacbc15f                                0 time=&quot;2018-02-19T12:10:07.930283397-05:00&quot; level=debug msg=&quot;libcontainerd: event unhandled: type:\\&quot;start-container\\&quot; id:\\&quot;d1a6d87886e2d515bfff37d826eeb671502fa7c6f47e422ec3b3549ecacbc15f\\&quot; timestamp:&lt;seconds:1519060207 nanos:927795344 &gt; &quot;  time=&quot;2018-02-19T12:10:07.930874606-05:00&quot; level=debug msg=&quot;Calling POST \/v1.26\/containers\/d1a6d87886e2d515bfff37d826eeb671502fa7c6f47e422ec3b3549ecacbc15f\/resize?h=35&amp;w=115&quot; <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u0414\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043e\u0431\u0440\u0430\u0437, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e (\u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u0440\u043e\u0444\u0438\u043b\u0438 seccomp, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438) \u0438 \u0442. \u0434., \u0438 \u0442. \u0434., \u0438 \u0442. \u0434\u2026 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u043e \u0432\u0441\u0435\u043c, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430, \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0432\u044b\u0432\u043e\u0434 <code>docker inspect containerid<\/code> \u0438 \u0444\u0430\u0439\u043b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>config.json<\/code> (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435).<\/p>\n<p>  \u0421\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, <i>containerd<\/i> \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0440\u0430\u043d\u0442\u0430\u0439\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u041e\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u0443, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <i>containerd-shim<\/i> \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0442\u0430\u0439\u043c OCI (\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c containerd \u00ab\u2013runtime\u00bb). \u0423 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0441\u0440\u0435\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/github.com\/opencontainers\/runc\">runc<\/a>. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <i>pstree<\/i>:<\/p>\n<pre><code class=\"go\">$ pstree -l -p -s -T systemd,1 --switched-root --system --deserialize 24   \u251c\u2500docker-containe,19606 --listen unix:\/\/\/run\/containerd.sock --shim \/usr\/libexec\/docker\/docker-containerd-shim-current --start-timeout 2m --debug   \u2502   \u251c\u2500docker-containe,19834 93a619715426f613646359863e77cc06fa85502273df931517ec3f4aaae50d5a \/var\/run\/docker\/libcontainerd\/93a619715426f613646359863e77cc06fa85502273df931517ec3f4aaae50d5a \/usr\/libexec\/docker\/docker-runc-current<\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a <i>pstree<\/i> \u043e\u0442\u0441\u0435\u043a\u0430\u0435\u0442 \u0438\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c <i>PID<\/i> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <i>ps<\/i>:<\/p>\n<pre><code class=\"go\">$ ps auxwww | grep [1]9606<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">root     19606  0.0  0.2 685636 10632 ?        Ssl  13:01   0:00 \/usr\/libexec\/docker\/docker-containerd-current --listen unix:\/\/\/run\/containerd.sock --shim \/usr\/libexec\/docker\/docker-containerd-shim-current --start-timeout 2m --debug<\/code><\/pre>\n<pre><code class=\"go\">$ ps auxwww | grep [1]9834<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">root     19834  0.0  0.0 527748  3020 ?        Sl   13:01   0:00 \/usr\/libexec\/docker\/docker-containerd-shim-current 93a619715426f613646359863e77cc06fa85502273df931517ec3f4aaae50d5a \/var\/run\/docker\/libcontainerd\/93a619715426f613646359863e77cc06fa85502273df931517ec3f4aaae50d5a \/usr\/libexec\/docker\/docker-runc-current<\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u044f \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <i>dockerd, containerd \u0438 shim<\/i>, \u044f \u043d\u0435 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043b, \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0439 \u0446\u0435\u043b\u0438 \u0441\u043b\u0443\u0436\u0438\u043b <i>shim<\/i>. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e Google \u043f\u0440\u0438\u0432\u0435\u043b \u043a \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u043c\u0443 <a href=\"https:\/\/groups.google.com\/forum\/#!topic\/docker-dev\/zaZFlvIx1_k\">\u0438\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044e <\/a> <a href=\"https:\/\/github.com\/crosbymichael\">\u041c\u0430\u0439\u043a\u043b\u0430 \u041a\u0440\u043e\u0441\u0431\u0438<\/a>. <i>Shim<\/i> \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:<\/p>\n<ol>\n<li>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0431\u0435\u0437 \u0434\u0435\u043c\u043e\u043d\u043e\u0432.<\/li>\n<li>STDIO \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 FD \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043c\u0435\u0440\u0442\u0438 containerd \u0438 docker.<\/li>\n<li>\u0421\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0432 containerd \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u044b\u0445\u043e\u0434\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.<\/li>\n<\/ol>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b. \u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043e\u0442 \u0434\u0435\u043c\u043e\u043d\u0430 <i>docker<\/i>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c <i>dockerd<\/i> \u0431\u0435\u0437 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b. \u0412\u0435\u0441\u044c\u043c\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e! \u042f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b, \u0447\u0442\u043e <i>shim<\/i> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0437\u0430\u043f\u0443\u0441\u043a <i>runc<\/i> \u0434\u043b\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b <i>runc<\/i> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u0432\u0435 \u0432\u0435\u0449\u0438: \u0444\u0430\u0439\u043b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u043f\u0443\u0442\u044c \u043a \u043e\u0431\u0440\u0430\u0437\u0443 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/containerd\/containerd\/blob\/master\/design\/architecture.md\">\u0431\u0430\u043d\u0434\u043b\u043e\u043c<\/a>). \u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c <i>rootfs<\/i>, <a href=\"https:\/\/prefetch.net\/blog\/2018\/02\/17\/exporting-docker-images-for-analysis\/\">\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u043e\u0431\u0440\u0430\u0437 <i>alpine docker<\/i><\/a>:<\/p>\n<pre><code class=\"go\">$ mkdir -p alpine\/rootfs<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">$ cd alpine<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">$ docker export d1a6d87886e2 | tar -C rootfs -xvf -<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">time=&quot;2018-02-19T12:54:13.082321231-05:00&quot; level=debug msg=&quot;Calling GET \/v1.26\/containers\/d1a6d87886e2\/export&quot;  .dockerenv bin\/ bin\/ash bin\/base64 bin\/bbconfig .....<\/code><\/pre>\n<p>  \u041e\u043f\u0446\u0438\u044f \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 <code>docker ps -a<\/code>. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <i>runc<\/i>:<\/p>\n<pre><code class=\"go\">$ runc spec<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0444\u0430\u0439\u043b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>config.json<\/code> \u0432 \u0432\u0430\u0448\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u044b \u0444\u0430\u0439\u043b\u043e\u043c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c runc \u0441 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c rootfs \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 (\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 <code>config.json<\/code>):<\/p>\n<pre><code class=\"go\">$ runc run rootfs<\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 alpine ash:<\/p>\n<pre><code class=\"go\">$ runc run rootfs<\/code><\/pre>\n<pre><code class=\"go\">\/ # cat \/etc\/os-release NAME=&quot;Alpine Linux&quot; ID=alpine VERSION_ID=3.7.0 PRETTY_NAME=&quot;Alpine Linux v3.7&quot; HOME_URL=&quot;http:\/\/alpinelinux.org&quot; BUG_REPORT_URL=&quot;http:\/\/bugs.alpinelinux.org&quot;<\/code><\/pre>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438 \u0438\u0433\u0440\u0430\u0442\u044c \u0441 <i>runc<\/i> <a href=\"https:\/\/github.com\/opencontainers\/runtime-spec\/blob\/master\/spec.md\">\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/a> \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043c\u043e\u0449\u043d\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Linux \u0438 \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u043c \u0441\u0440\u0435\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0435\u0440. \u042f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0435\u0433\u043a\u0430 \u043a\u043e\u0441\u043d\u0443\u043b\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e <a href=\"https:\/\/github.com\/opencontainers\/runc\">runc<\/a> \u0438 <a href=\"https:\/\/containerd.io\/\">containerd<\/a>. \u041e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b!<\/p>\n<hr>\n<p>  <a href=\"https:\/\/otus.pw\/pob3\/\">\u0423\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u0443\u0440\u0441\u0435.<\/a><\/p>\n<hr>\n<\/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=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/511414\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/511414\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/511414\/\"><b><i>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 <a href=\"https:\/\/otus.pw\/pob3\/\">\u00ab\u0418\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Kubernetes\u00bb<\/a>.<\/i><\/b><\/p>\n<hr>\n<p>  \u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043d\u0435\u043c\u0430\u043b\u043e \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b Linux-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <code>docker run<\/code>. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u0440\u0435\u0437\u044e\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u044f \u0432\u044b\u044f\u0441\u043d\u0438\u043b, \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0446\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443. \u041d\u0430\u0447\u043d\u0435\u043c \u043c\u044b \u043d\u0430\u0448\u0435 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 alpine \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e docker run:<\/p>\n<pre><code class=\"go\">$ docker run -i -t --name alpine alpine ash<\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u043d\u0438\u0436\u0435. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 docker run, \u043e\u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0435\u0439 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 JSON \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c docker. \u0417\u0430\u0442\u0435\u043c \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u043c\u043e\u043d\u0443 docker \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0435\u0442 \u0434\u043e\u043c\u0435\u043d\u0430 UNIX \/var\/run\/docker.sock. \u0414\u043b\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0437\u0430 <a href=\"https:\/\/docs.docker.com\/engine\/api\/v1.26\/\">\u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 API<\/a> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <i>strace<\/i>:<\/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-307111","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307111","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=307111"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307111\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=307111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=307111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=307111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}