{"id":258176,"date":"2015-05-28T17:40:02","date_gmt":"2015-05-28T13:40:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=258176"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=258176","title":{"rendered":"\u041a\u0430\u043a \u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b Docker \u043e\u0431\u0440\u0430\u0437 \u043d\u0430 98.8% \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 fanotify"},"content":{"rendered":"<p>             <i>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f\u043c \u00ab\u0425\u0430\u0431\u0440\u0430\u0445\u0430\u0431\u0440\u0430\u00bb \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 <a href=\"https:\/\/blog.jtlebi.fr\/2015\/04\/25\/how-i-shrunk-a-docker-image-by-98-8-featuring-fanotify\/\">\u00abHow I shrunk a Docker image by 98.8% \u2013 featuring fanotify\u00bb<\/a>.<\/i><\/p>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434 \u044f \u0434\u0435\u043b\u0430\u043b \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0434\u043e\u043a\u043b\u0430\u0434 \u043e Docker. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0430\u0434\u043c\u0438\u043d\u043e\u0432 \u0441\u043f\u0440\u043e\u0441\u0438\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0415\u0441\u0442\u044c \u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u201e\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u0445\u0443\u0434\u0435\u043d\u0438\u044f \u0434\u043b\u044f Docker \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u201c\u00bb?<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u0432\u0440\u043e\u0434\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u043a\u044d\u0448\u0430, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0447\u0430\u044f Linux \u0441\u0438\u0441\u0442\u0435\u043c\u0430? \u041a\u0430\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0435? \u0414\u043b\u044f Go binary \u044f \u043d\u0430\u0448\u0435\u043b \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u041e\u043d \u0431\u044b\u043b \u0441\u043e\u0431\u0440\u0430\u043d \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u2014 6.12 \u041cB.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u0430, \u0443\u0436! \u041d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0448\u0430\u043d\u0441 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0441 \u043b\u044e\u0431\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c?<\/p>\n<p>  \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u0418\u0434\u0435\u044f \u043f\u0440\u043e\u0441\u0442\u0430: \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u043b\u0438\u0441\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044e\/\u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044e\/\u2026, \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430 \u0442\u0430\u043a\u0438\u043c \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u044b \u043d\u0435 \u0431\u044b\u043b\u0438. \u042d\u043c\u043c, \u0437\u0432\u0443\u0447\u0438\u0442 \u043c\u043d\u043e\u0433\u043e\u043e\u0431\u0435\u0449\u0430\u044e\u0449\u0435, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0436\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c PoC \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0438\u0434\u0435\u0438.<\/p>\n<h4>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u041e\u0431\u0440\u0430\u0437: Ubuntu (~200MB)<\/li>\n<li>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e: \/bin\/ls<\/li>\n<li>\u0426\u0435\u043b\u044c: \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c<\/li>\n<\/ul>\n<p>  \/bin\/ls \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u0434\u0435\u0438, \u0431\u0435\u0437 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u0435\u0439, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043d\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0439, \u0432\u0435\u0434\u044c \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0446\u0435\u043b\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u2014 \u044d\u0442\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0443. \u0411\u0443\u0434\u044c \u0442\u043e stat \u0438\u043b\u0438 open. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0430\u0440\u0430 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"http:\/\/linux.die.net\/man\/7\/inotify\">inotify<\/a>, \u043d\u043e \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 watch \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443, \u0447\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0446\u0435\u043b\u043e\u0439 \u043a\u0443\u0447\u0435 \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 watch\u2019\u0435\u0439. \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LD_PRELOAD, \u043d\u043e, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0435\u0433\u043e \u0440\u0430\u0434\u043e\u0441\u0442\u0438 \u043b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442, \u0430 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445 \u2014 \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u0443 \u0438 \u0432-\u0442\u0440\u0435\u0442\u044c\u0438\u0445 \u2014 \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (\u043a\u0442\u043e \u0441\u043a\u0430\u0437\u0430\u043b golang\u2019\u043e\u0432?). \u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <a href=\"http:\/\/linux.die.net\/man\/2\/ptrace\">ptrace<\/a> \u0434\u043b\u044f \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0414\u0430, \u0443 \u043d\u0435\u0433\u043e \u0442\u043e\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0435 \u0438 \u0433\u0438\u0431\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041c\u0435\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u2014 <a href=\"http:\/\/man7.org\/linux\/man-pages\/man7\/fanotify.7.html\">fanotify<\/a> \u0438, \u043a\u0430\u043a \u0443\u0436\u0435 \u0441\u0442\u0430\u043b\u043e \u044f\u0441\u043d\u043e \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d.<\/p>\n<p>  fanotify \u0431\u044b\u043b \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u0430\u043a \u00ab\u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u0439\u00bb \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0430\u043d\u0442\u0438-\u0432\u0438\u0440\u0443\u0441\u043d\u044b\u0445 \u0432\u0435\u043d\u0434\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0432\u0441\u0435\u0439 \u0442\u043e\u0447\u043a\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430 \u0440\u0430\u0437. \u0417\u0432\u0443\u0447\u0438\u0442 \u0437\u043d\u0430\u043a\u043e\u043c\u043e? \u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043a\u0430\u0437\u0430 \u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0435, \u0438\u043b\u0438 \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0443, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0435\u0441\u043b\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044f\u0434\u0440\u0430 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f user-space \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044f \u043e \u043f\u043e\u0442\u0435\u0440\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e. \u041d\u0435\u043d\u0430\u0432\u044f\u0437\u0447\u0438\u0432\u044b\u0439, \u0432\u0441\u044f \u0442\u043e\u0447\u043a\u0430 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430 \u0440\u0430\u0437, \u043f\u0440\u043e\u0441\u0442 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 (\u043d\u0443, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u2026). \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0441\u043c\u0435\u0448\u043d\u044b\u043c, \u043d\u043e \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u044f \u0443\u0437\u043d\u0430\u043b \u043f\u043e\u0437\u0436\u0435.<\/p>\n<h4>\u0412 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043d \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442<\/h4>\n<p>  <\/p>\n<ol>\n<li>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c fanotify \u0432 FAN_CLASS_NOTIFICATION \u043c\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <a href=\"http:\/\/man7.org\/linux\/man-pages\/man2\/fanotify_init.2.html\">fanotify_init<\/a>:\n<pre><code>\/\/ Open ``fan`` fd for fanotify notifications. Messages will embed a  \/\/ filedescriptor on accessed file. Expect it to be read-only fan = fanotify_init(FAN_CLASS_NOTIF, O_RDONLY);<\/code><\/pre>\n<p>  <\/li>\n<li>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 FAN_ACCESS \u0438 FAN_OPEN \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 &quot;\/&quot; FAN_MARK_MOUNTPOINT \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <a href=\"http:\/\/man7.org\/linux\/man-pages\/man2\/fanotify_mark.2.html\">fanotify_mark<\/a>:\n<pre><code>\/\/ Watch open\/access events on root mountpoint fanotify_mark(     fan,      FAN_MARK_ADD | FAN_MARK_MOUNT, \/\/ Add mountpoint mark to fan     FAN_ACCESS | FAN_OPEN,         \/\/ Report open and access events, non blocking     -1, &quot;\/&quot;                        \/\/ Watch root mountpoint (-1 is ignored for FAN_MARK_MOUNT type calls) );<\/code><\/pre>\n<p>  <\/li>\n<li>\u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0442 fanotify_init \u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u043d\u0438\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f FAN_EVENT_NEXT:\n<pre><code>\/\/ Read pending events from ``fan`` into ``buf`` buflen = read(fan, buf, sizeof(buf));   \/\/ Position cursor on first message metadata = (struct fanotify_event_metadata*)&buf;   \/\/ Loop until we reached the last event while(FAN_EVENT_OK(metadata, buflen)) {     \/\/ Do something interesting with the notification     \/\/ ``metadata-&gt;fd`` will contain a valid, RO fd to accessed file.       \/\/ Close opened fd, otherwise we'll quickly exhaust the fd pool.     close(metadata-&gt;fd);       \/\/ Move to next event in buffer     metadata = FAN_EVENT_NEXT(metadata, buflen); } <\/code><\/pre>\n<\/li>\n<\/ol>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043d\u0430\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u044b\u043b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f, \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0438. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442\u044c (\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u043f\u0443\u0449\u0435\u043d\u044b \u0440\u0430\u0434\u0438 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f).<\/p>\n<pre><code>#include &lt;fcntl.h&gt; #include &lt;limits.h&gt; #include &lt;stdio.h&gt; #include &lt;sys\/fanotify.h&gt;   int main(int argc, char** argv) {     int fan;     char buf[4096];     char fdpath[32];     char path[PATH_MAX + 1];     ssize_t buflen, linklen;     struct fanotify_event_metadata *metadata;       \/\/ Init fanotify structure     fan = fanotify_init(FAN_CLASS_NOTIF, O_RDONLY);       \/\/ Watch open\/access events on root mountpoint     fanotify_mark(         fan,         FAN_MARK_ADD | FAN_MARK_MOUNT,         FAN_ACCESS | FAN_OPEN,         -1, &quot;\/&quot;     );       while(1) {         buflen = read(fan, buf, sizeof(buf));         metadata = (struct fanotify_event_metadata*)&buf;           while(FAN_EVENT_OK(metadata, buflen)) {             if (metadata-&gt;mask & FAN_Q_OVERFLOW) {                 printf(&quot;Queue overflow!\\n&quot;);                 continue;             }               \/\/ Resolve path, using automatically opened fd             sprintf(fdpath, &quot;\/proc\/self\/fd\/%d&quot;, metadata-&gt;fd);             linklen = readlink(fdpath, path, sizeof(path) - 1);             path[linklen] = '\\0';             printf(&quot;%s\\n&quot;, path);               close(metadata-&gt;fd);             metadata = FAN_EVENT_NEXT(metadata, buflen);         }     } }<\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c:<\/p>\n<pre><code class=\"bash\">gcc main.c --static -o fanotify-profiler<\/code><\/pre>\n<p>  \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043b\u044e\u0431\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0443 \u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u00ab\/\u00bb \u0442\u043e\u0447\u043a\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041e\u0442\u043b\u0438\u0447\u043d\u043e.<\/p>\n<p>  \u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c Ubuntu \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u043d\u0430\u0448 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433, \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \/bin\/ls. Fanotify\u2019\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 CAP_SYS_ADMIN \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u043e \u00abcatch-all\u00bb root \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432 \u2014privileged \u043c\u043e\u0434\u0435.<\/p>\n<pre><code class=\"bash\"># Run image docker run --name profiler_ls \\            --volume $PWD:\/src \\            --cap-add SYS_ADMIN \\            -it ubuntu \/src\/fanotify-profiler   # Run the command to profile, from another shell docker exec -it profiler_ls ls   # Interrupt Running image using docker kill profiler_ls # You know, the &quot;dynamite&quot;<\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">\/etc\/passwd \/etc\/group \/etc\/passwd \/etc\/group \/bin\/ls \/bin\/ls \/bin\/ls \/lib\/x86_64-linux-gnu\/ld-2.19.so \/lib\/x86_64-linux-gnu\/ld-2.19.so \/etc\/ld.so.cache \/lib\/x86_64-linux-gnu\/libselinux.so.1 \/lib\/x86_64-linux-gnu\/libacl.so.1.1.0 \/lib\/x86_64-linux-gnu\/libc-2.19.so \/lib\/x86_64-linux-gnu\/libc-2.19.so \/lib\/x86_64-linux-gnu\/libpcre.so.3.13.1 \/lib\/x86_64-linux-gnu\/libdl-2.19.so \/lib\/x86_64-linux-gnu\/libdl-2.19.so \/lib\/x86_64-linux-gnu\/libattr.so.1.1.0<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e! \u0421\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \/bin\/ls. \u0422\u0430\u043a \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u044d\u0442\u043e \u0432 \u00abFROM scratch\u00bb Docker \u043e\u0431\u0440\u0430\u0437 \u2014 \u0438 \u0433\u043e\u0442\u043e\u0432\u043e.<\/p>\n<p>  \u041d\u043e \u043d\u0435 \u0442\u0443\u0442-\u0442\u043e \u0431\u044b\u043b\u043e\u2026 \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0435 \u0437\u0430\u0431\u0435\u0433\u0430\u0442\u044c \u043d\u0430\u043f\u0435\u0440\u0435\u0434, \u0432\u0441\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<pre><code class=\"bash\"># Export base docker image mkdir ubuntu_base docker export profiler_ls | sudo tar -x -C ubuntu_base   # Create new image mkdir ubuntu_lean   # Get the linker (trust me) sudo mkdir -p ubuntu_lean\/lib64 sudo cp -a ubuntu_base\/lib64\/ld-linux-x86-64.so.2 ubuntu_lean\/lib64\/   # Copy the files sudo mkdir -p ubuntu_lean\/etc sudo mkdir -p ubuntu_lean\/bin sudo mkdir -p ubuntu_lean\/lib\/x86_64-linux-gnu\/   sudo cp -a ubuntu_base\/bin\/ls ubuntu_lean\/bin\/ls sudo cp -a ubuntu_base\/etc\/group ubuntu_lean\/etc\/group sudo cp -a ubuntu_base\/etc\/passwd ubuntu_lean\/etc\/passwd sudo cp -a ubuntu_base\/etc\/ld.so.cache ubuntu_lean\/etc\/ld.so.cache sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/ld-2.19.so ubuntu_lean\/lib\/x86_64-linux-gnu\/ld-2.19.so sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/ld-2.19.so ubuntu_lean\/lib\/x86_64-linux-gnu\/ld-2.19.so sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libselinux.so.1 ubuntu_lean\/lib\/x86_64-linux-gnu\/libselinux.so.1 sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libacl.so.1.1.0 ubuntu_lean\/lib\/x86_64-linux-gnu\/libacl.so.1.1.0 sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libc-2.19.so ubuntu_lean\/lib\/x86_64-linux-gnu\/libc-2.19.so sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libpcre.so.3.13.1 ubuntu_lean\/lib\/x86_64-linux-gnu\/libpcre.so.3.13.1 sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libdl-2.19.so ubuntu_lean\/lib\/x86_64-linux-gnu\/libdl-2.19.so sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libattr.so.1.1.0 ubuntu_lean\/lib\/x86_64-linux-gnu\/libattr.so.1.1.0   # Import it back to Docker cd ubuntu_lean sudo tar -c . | docker import - ubuntu_lean<\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0437:<\/p>\n<pre><code class=\"bash\">docker run --rm -it ubuntu_lean \/bin\/ls<\/code><\/pre>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<pre><code class=\"bash\"># If you did not trust me with the linker (as it was already loaded when the profiler started, it does not show in the ouput) no such file or directoryFATA[0000] Error response from daemon: Cannot start container f318adb174a9e381500431370a245275196a2948828919205524edc107626d78: no such file or directory   # Otherwise \/bin\/ls: error while loading shared libraries: libacl.so.1: cannot open<\/code><\/pre>\n<p>  \u0414\u0430 \u0443\u0436. \u041d\u043e \u0447\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a? \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u043e\u043c? \u0410\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0430\u0439\u043b\u0443, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0442\u0430\u043a \u044d\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0433\u043e\u043d\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0441\u0438\u043b\u0430\u043c\u0438. \u042d\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 fanotify \u0432\u044b\u0434\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0443\u0442\u0435\u0439, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f. \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u0444\u0430\u0439\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \/proc\/self\/fd\/[fd]. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043e\u043d \u043d\u0435 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a\u0430\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043b\u0430\u0441\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 fanotify\u2019\u0435\u043c \u0444\u0430\u0439\u043b\u044b, \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0435 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 find \u043d\u0430\u043c \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442.<\/p>\n<pre><code class=\"bash\"># Find all files refering to a given one find -L -samefile &quot;.\/lib\/x86_64-linux-gnu\/libacl.so.1.1.0&quot; 2&gt;\/dev\/null   # If you want to exclude the target itself from the results find -L -samefile &quot;.\/lib\/x86_64-linux-gnu\/libacl.so.1.1.0&quot; -a ! -path &quot;.\/<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0446\u0438\u043a\u043b\u043e\u043c:<\/p>\n<pre><code class=\"bash\">for f in $(cd ubuntu_lean; find) do      (         cd ubuntu_base         find -L -samefile &quot;$f&quot; -a ! -path &quot;$f&quot;     ) 2&gt;\/dev\/null done<\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0445 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a. \u042d\u0442\u043e \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<pre><code class=\"bash\">.\/lib\/x86_64-linux-gnu\/libc.so.6 .\/lib\/x86_64-linux-gnu\/ld-linux-x86-64.so.2 .\/lib\/x86_64-linux-gnu\/libattr.so.1 .\/lib\/x86_64-linux-gnu\/libdl.so.2 .\/lib\/x86_64-linux-gnu\/libpcre.so.3 .\/lib\/x86_64-linux-gnu\/libacl.so.1<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u0438 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u0440\u0430\u0437.<\/p>\n<pre><code class=\"bash\"># Copy the links sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libc.so.6 ubuntu_lean\/lib\/x86_64-linux-gnu\/libc.so.6 sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/ld-linux-x86-64.so.2 ubuntu_lean\/lib\/x86_64-linux-gnu\/ld-linux-x86-64.so.2 sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libdl.so.2 ubuntu_lean\/lib\/x86_64-linux-gnu\/libdl.so.2 sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libpcre.so.3 ubuntu_lean\/lib\/x86_64-linux-gnu\/libpcre.so.3 sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libacl.so.1 ubuntu_lean\/lib\/x86_64-linux-gnu\/libacl.so.1 sudo cp -a ubuntu_base\/lib\/x86_64-linux-gnu\/libattr.so.1 ubuntu_lean\/lib\/x86_64-linux-gnu\/libattr.so.1   # Import it back to Docker cd ubuntu_lean docker rmi -f ubuntu_lean; sudo tar -c . | docker import - ubuntu_lean<\/code><\/pre>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/b>: \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043e\u043d \u043d\u0435 \u0432\u0435\u0440\u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0438, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 chroot. \u0418\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430, \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0447\u0442\u043e find \u0438\u043b\u0438 \u0435\u0433\u043e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0430 \u0432 \u043d\u0435\u043c \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043e\u0431\u0440\u0430\u0437:<\/p>\n<pre><code class=\"bash\">docker run --rm -it ubuntu_lean \/bin\/ls<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:  <\/p>\n<pre><code class=\"bash\">bin  dev  etc  lib  lib64  proc  sys<\/code><\/pre>\n<p>  <\/p>\n<h4>\u0418\u0442\u043e\u0433<\/h4>\n<p>  <b>ubuntu<\/b>: 209MB<br \/>  <b>ubuntu_lean<\/b>: 2.5MB<\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0437, \u0432 <b>83.5<\/b> \u0440\u0430\u0437 \u043c\u0435\u043d\u044c\u0448\u0435. \u042d\u0442\u043e \u0441\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 <b>98.8%<\/b>.<\/p>\n<h4>\u041f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>  \u041a\u0430\u043a \u0438 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u043e\u043d \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e\/\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \/bin\/ls -l \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0435 \u0438 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u0441\u0451 \u0441\u0430\u043c\u0438.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0441\u043f\u043e\u0439\u043b\u0435\u0440 \u0434\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0445<\/b><\/p>\n<div class=\"spoiler_text\">\u041e\u043d\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u0443 \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c.  <\/div>\n<\/div>\n<p>  \u0422\u0435\u0445\u043d\u0438\u043a\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0431\u0435\u0437 \u0438\u0437\u044a\u044f\u043d\u0430. \u041e\u043d\u0430 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0444\u0430\u0439\u043b \u0431\u044b\u043b \u043e\u0442\u043a\u0440\u044b\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u0444\u0430\u0439\u043b. \u042d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0434\u043b\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043e\u043a, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 cross-filesytems (\u0447\u0438\u0442\u0430\u0439 cross-volumes). \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 fanotify, \u043c\u044b \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u0438 \u0441\u043b\u043e\u043c\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u00ab\u0441\u0436\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u00bb, \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435, \u044f \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0431\u044b ptrace.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f<\/h4>\n<p>  <\/p>\n<ol>\n<li>\u041f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c, \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438. \u041e\u0431\u0440\u0430\u0437\u044b Docker \u0441\u043a\u043e\u0440\u0435\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0433;<\/li>\n<li>\u0412\u043e\u043e\u0431\u0449\u0435-\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c FAN_UNLIMITED_QUEUE, \u0432\u044b\u0437\u044b\u0432\u0430\u044f fanotify_init \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u044d\u0442\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 CAP_SYS_ADMIN;<\/li>\n<li>\u041e\u043d \u0442\u0430\u043a \u0436\u0435 \u0432 2.4 \u0440\u0430\u0437\u0430 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u043e\u0431\u0440\u0430\u0437 \u043d\u0430 6.13MB, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u044b\u043c.<\/li>\n<\/ol>\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\/259021\/\"> http:\/\/habrahabr.ru\/post\/259021\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             <i>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f\u043c \u00ab\u0425\u0430\u0431\u0440\u0430\u0445\u0430\u0431\u0440\u0430\u00bb \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 <a href=\"https:\/\/blog.jtlebi.fr\/2015\/04\/25\/how-i-shrunk-a-docker-image-by-98-8-featuring-fanotify\/\">\u00abHow I shrunk a Docker image by 98.8% \u2013 featuring fanotify\u00bb<\/a>.<\/i><\/p>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434 \u044f \u0434\u0435\u043b\u0430\u043b \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0434\u043e\u043a\u043b\u0430\u0434 \u043e Docker. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0430\u0434\u043c\u0438\u043d\u043e\u0432 \u0441\u043f\u0440\u043e\u0441\u0438\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0415\u0441\u0442\u044c \u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u201e\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u0445\u0443\u0434\u0435\u043d\u0438\u044f \u0434\u043b\u044f Docker \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u201c\u00bb?<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u0432\u0440\u043e\u0434\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u043a\u044d\u0448\u0430, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0447\u0430\u044f Linux \u0441\u0438\u0441\u0442\u0435\u043c\u0430? \u041a\u0430\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0435? \u0414\u043b\u044f Go binary \u044f \u043d\u0430\u0448\u0435\u043b \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u041e\u043d \u0431\u044b\u043b \u0441\u043e\u0431\u0440\u0430\u043d \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u2014 6.12 \u041cB.  <\/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-258176","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258176","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=258176"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258176\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}