{"id":183,"date":"2015-08-06T15:12:49","date_gmt":"2015-08-06T06:12:49","guid":{"rendered":"http:\/\/blog.barbayar.net\/?p=183"},"modified":"2015-08-06T15:19:07","modified_gmt":"2015-08-06T06:19:07","slug":"vagrant-%d0%b1%d0%be%d0%bb%d0%be%d0%bd-docker-%d1%8b%d0%bd-%d1%82%d1%83%d1%85%d0%b0%d0%b9-%d1%85%d0%b0%d0%bb%d1%8c%d1%82","status":"publish","type":"post","link":"https:\/\/blog.barbayar.net\/?p=183","title":{"rendered":"Vagrant \u0431\u043e\u043b\u043e\u043d Docker-\u044b\u043d \u0442\u0443\u0445\u0430\u0439 \u0445\u0430\u043b\u044c\u0442"},"content":{"rendered":"<p>\u0411\u0430\u0440\u0430\u0433 \u0431\u04af\u0445 startup \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0443\u0434 \u044d\u043d\u044d 2 tool-\u044b\u0433 \u0430\u0448\u0438\u0433\u043b\u0430\u0434\u0430\u0433 \u0431\u0430\u0439\u0445. Startup \u0433\u044d\u043b\u0442\u0433\u04af\u0439 \u0442\u043e\u043c\u0443\u0443\u0434 \u043d\u044c \u0447 \u0431\u0430\u0441 \u0430\u0448\u0438\u0433\u043b\u0430\u0434\u0430\u0433 \u0431\u0430\u0439\u0445 \u043b \u0434\u0430\u0430.<br \/>\n\u042f\u043c\u0430\u0440 \u0442\u043e\u0445\u0438\u043e\u043b\u0434\u043e\u043b\u0434 \u0430\u0448\u0438\u0433\u043b\u0430\u0432\u0430\u043b \u0437\u04af\u0433\u044d\u044d\u0440 \u0432\u044d \u0433\u044d\u0434\u0433\u0438\u0439\u0433 \u0445\u0430\u043b\u044c\u0442 \u0442\u0430\u0439\u043b\u0431\u0430\u0440\u043b\u0430\u0445 \u0433\u044d\u0436 \u043e\u0440\u043e\u043b\u0434\u044a\u0451.<br \/>\n\u042f\u043c\u0430\u0440 \u043d\u044d\u0433\u044d\u043d \u0441\u0438\u0441\u0442\u0435\u043c \u0445\u04e9\u0433\u0436\u04af\u04af\u043b\u044d\u044d\u0434 \u0434\u0443\u0443\u0441\u0441\u0430\u043d\u044b\u0445\u0430\u0430 \u0434\u0430\u0440\u0430\u0430, \u0431\u0438\u0434 \u043d\u0430\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0440\u04af\u04af\u0433\u044d\u044d \u043a\u043e\u0434\u043e\u043e deploy \u0445\u0438\u0439\u0434\u044d\u0433. \u0422\u044d\u0440 \u04af\u0435\u0434 \u044f\u043d\u0437 \u0431\u04af\u0440\u0438\u0439\u043d \u043b \u0430\u0441\u0443\u0443\u0434\u0430\u043b\u0442\u0430\u0439 \u0442\u0443\u043b\u0433\u0430\u0440\u0447 \u0431\u0430\u0439\u0441\u0430\u043d \u0431\u0430\u0439\u043b\u0433\u04af\u0439.<br \/>\n\u042f\u0430\u0433\u0430\u0430\u0434 \u0445\u04e9\u0433\u0436\u04af\u04af\u043b\u0436 \u0431\u0430\u0439\u0445\u0430\u0434 \u0430\u0441\u0443\u0443\u0434\u0430\u043b \u0433\u0430\u0440\u0430\u0430\u0433\u04af\u0439 \u0445\u044d\u0440\u043d\u044d\u044d, \u044f\u0433 production \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u04af\u04af\u0433\u044d\u044d deploy \u0445\u0438\u0439\u0445 \u04af\u0435\u0434 \u0430\u0441\u0443\u0443\u0434\u0430\u043b \u0433\u0430\u0440\u0430\u0432?<br \/>\n\u042f\u0430\u0433\u0430\u0430\u0434 \u0433\u044d\u0432\u044d\u043b, \u0445\u04e9\u0433\u0436\u04af\u04af\u043b\u0436 \u0431\u0430\u0439\u0433\u0430\u0430 \u043e\u0440\u0447\u0438\u043d(development environment) \u0447\u0438\u043d\u044c \u0431\u04af\u0442\u044d\u044d\u0433\u0434\u0445\u04af\u04af\u043d \u0431\u043e\u043b\u0436 \u0430\u0436\u0438\u043b\u043b\u0430\u0445 \u043e\u0440\u0447\u0438\u043d(production environment)-\u043e\u043e\u0441 \u0447\u0438\u043d\u044c \u04e9\u04e9\u0440 \u0431\u0430\u0439\u0433\u0430\u0430 \u0431\u043e\u043b\u043e\u0445\u043e\u043e\u0440.<br \/>\n\u0418\u0445\u044d\u043d\u0445 \u0442\u043e\u0445\u0438\u043e\u043b\u0434\u043e\u043b\u0434, Vagrant \u0431\u043e\u043b\u043e\u043d Docker-\u044b\u0433 \u0430\u0448\u0438\u0433\u043b\u0430\u0445\u0433\u04af\u0439\u0433\u044d\u044d\u0440, production-\u0442\u0430\u0439 \u044f\u0433 \u0430\u0434\u0438\u043b\u0445\u0430\u043d \u043e\u0440\u0447\u0438\u043d \u04af\u04af\u0441\u0433\u044d\u0445\u044d\u0434 \u0445\u044d\u0446\u04af\u04af. \u0418\u0445\u044d\u043d\u0445 \u0441\u0435\u0440\u0432\u0435\u0440-\u04af\u04af\u0434 Linux based, \u0445\u0430\u0440\u0438\u043d \u0445\u04e9\u0433\u0436\u04af\u04af\u043b\u044d\u0433\u0447\u0438\u0434 \u0438\u0445\u044d\u0432\u0447\u043b\u044d\u043d Mac OS X\u00a0\u044d\u0441\u0432\u044d\u043b Windows \u0430\u0448\u0438\u0433\u043b\u0430\u0434\u0430\u0433. Mac OS X-\u044b\u043d \u0445\u0443\u0432\u044c\u0434 UNIX based \u0431\u043e\u043b\u043e\u0445\u043e\u043e\u0440, Windows-\u044b\u0433 \u0431\u043e\u0434\u0432\u043e\u043b \u0430\u0440\u0430\u0439 \u0434\u044d\u044d\u0440 \u0447 \u0433\u044d\u0441\u044d\u043d, 100% \u0438\u0436\u0438\u043b\u0445\u044d\u043d \u043e\u0440\u0447\u0438\u043d \u04af\u04af\u0441\u0433\u044d\u0445\u044d\u0434 \u0431\u0430\u0441 \u043b \u0445\u04af\u043d\u0434\u0440\u044d\u043b \u0433\u0430\u0440\u043d\u0430.<br \/>\n\u0418\u0436\u0438\u043b\u0445\u044d\u043d \u043e\u0440\u0447\u0438\u043d \u0433\u044d\u0434\u0433\u044d\u044d\u0440 \u0431\u0438, \u044f\u0433 \u0430\u0434\u0438\u043b\u0445\u0430\u043d OS version, \u044f\u0433 \u0430\u0434\u0438\u043b\u0445\u0430\u043d PHP version, \u044f\u0433 \u0430\u0434\u0438\u043b\u0445\u0430\u043d Ruby version, \u044f\u0433 \u0430\u0434\u0438\u043b\u0445\u0430\u043d MySQL version \u0442\u044d\u0439 \u0431\u0430\u0439\u0445\u044b\u0433 \u0438\u043b\u044d\u0440\u0445\u0438\u0439\u043b\u0436 \u0431\u0430\u0439\u0433\u0430\u0430 \u0448\u04af\u04af.<br \/>\nMySQL-\u044b\u043d \u0436\u0438\u0436\u0438\u0433 version-\u044b\u043d \u04e9\u04e9\u0440\u0447\u043b\u04e9\u043b\u0442 \u0445\u04af\u0440\u0442\u044d\u043b, \u0441\u0438\u0441\u0442\u0435\u043c\u044d\u044d\u0441 \u0447\u0438\u043d\u044c \u0445\u0430\u043c\u0430\u0430\u0440\u0430\u0430\u0434, \u04e9\u04e9\u0440 \u0430\u0436\u0438\u043b\u043b\u0430\u0445 \u0442\u043e\u0445\u0438\u043e\u043b\u0434\u043e\u043b \u04af\u04af\u0441\u0447 \u0431\u043e\u043b\u043d\u043e.<\/p>\n<p><strong>Vagrant<\/strong><br \/>\n\u0412\u0435\u0431 \u0445\u0443\u0443\u0434\u0430\u0441: <a title=\"https:\/\/www.vagrantup.com\/\" href=\"https:\/\/www.vagrantup.com\/\">https:\/\/www.vagrantup.com\/<\/a><br \/>\n\u042d\u043d\u044d tool \u043d\u044c <a title=\"https:\/\/www.virtualbox.org\/\" href=\"https:\/\/www.virtualbox.org\/\">VirtualBox<\/a> \u0430\u0448\u0438\u0433\u043b\u0430\u043d, virtual machine \u04af\u04af\u0441\u0433\u044d\u043d, \u0442\u044d\u0440\u044d\u043d \u0434\u044d\u044d\u0440 \u04e9\u04e9\u0440\u0438\u0439\u043d \u0447\u0438\u043d\u044c \u0445\u04af\u0441\u0441\u044d\u043d \u043e\u0440\u0447\u0438\u043d\u0433 \u0431\u04af\u0440\u0434\u04af\u04af\u043b\u0434\u044d\u0433 tool \u044e\u043c.<br \/>\n\u0410\u0448\u0438\u0433\u043b\u0430\u0445\u0430\u0434 \u0438\u0445 \u044d\u043d\u0433\u0438\u0439\u043d. Vagrantfile \u0434\u043e\u0442\u043e\u0440, \u044f\u043c\u0430\u0440 virtual machine \u04af\u04af\u0441\u0433\u044d\u043c\u044d\u044d\u0440 \u0431\u0430\u0439\u0433\u0430\u0430, \u044f\u043c\u0430\u0440 OS \u0430\u0448\u0438\u0433\u043b\u0430\u043c\u0430\u0430\u0440 \u0431\u0430\u0439\u0433\u0430\u0430, OS-\u044d\u044d initialize \u0445\u0438\u0439\u0441\u043d\u0438\u0439 \u0434\u0430\u0440\u0430\u0430 \u044e\u0443 \u044e\u0443 \u0441\u0443\u0443\u043b\u0433\u0430\u043c\u0430\u0430\u0440 \u0431\u0430\u0439\u0433\u0430\u0430\u0433\u0430\u0430 \u0431\u0438\u0447\u0438\u0436 \u04e9\u0433\u04e9\u04e9\u0434 \u043b \u0431\u043e\u043b\u043e\u043e. Vagrantfile-\u0430\u0430 \u04af\u04af\u0441\u0433\u044d\u0441\u044d\u043d\u0438\u0439\u0445\u044d\u044d \u0434\u0430\u0440\u0430\u0430 \u0434\u0430\u0440\u0430\u0430\u0445 2 \u043c\u04e9\u0440 \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u044b\u0433 \u0431\u0438\u0447\u0438\u0445\u044d\u0434 \u043b \u0445\u0430\u043d\u0433\u0430\u043b\u0442\u0442\u0430\u0439.<\/p>\n<pre class=\"lang:default decode:true\">vagrant up \/\/ Virtual Machine-\u0438\u0439\u0433 initialize \u0445\u0438\u0439\u0445\r\nvagrant ssh \/\/ SSH-\u044d\u044d\u0440 Virtual Machine-\u0440\u04af\u04af\u0433\u044d\u044d \u043e\u0440\u043e\u0445<\/pre>\n<p>Vagrant-\u044b\u043d \u0432\u0435\u0431 \u0445\u0443\u0443\u0434\u0430\u0441 \u0440\u0443\u0443 \u043d\u044c \u043e\u0440\u043e\u043e\u0434 \u0445\u0430\u0440\u0432\u0430\u043b, Vagrantfile \u0445\u044d\u0440\u0445\u044d\u043d \u04af\u04af\u0441\u0433\u044d\u0445 \u0442\u0430\u043b\u0430\u0430\u0440, \u0438\u0445 \u0434\u044d\u043b\u0433\u044d\u0440\u044d\u043d\u0433\u04af\u0439 \u0442\u0430\u0439\u043b\u0431\u0430\u0440\u043b\u0430\u0441\u0430\u043d \u0431\u0430\u0439\u0433\u0430\u0430.<br \/>\n<strong>TIP<\/strong>: Synced Folders \u04af\u04af\u0441\u0433\u044d\u0445\u0434\u044d\u044d NFS \u0430\u0448\u0438\u0433\u043b\u0430\u0432\u0430\u043b, \u043c\u044d\u0434\u044d\u0433\u0434\u044d\u0445\u04af\u0439\u0446\u044d\u044d\u0440 \u0445\u0443\u0440\u0434\u0430\u043d \u0430\u0436\u0438\u043b\u043b\u0430\u043d\u0430.<\/p>\n<p><strong>Docker<\/strong><br \/>\n\u0412\u0435\u0431 \u0445\u0443\u0443\u0434\u0430\u0441: <a title=\"https:\/\/www.docker.com\/\" href=\"https:\/\/www.docker.com\/\">https:\/\/www.docker.com\/<\/a><br \/>\n\u0417\u043e\u0440\u0438\u043b\u0433\u044b\u043d \u0445\u0443\u0432\u044c\u0434 \u0431\u043e\u043b Vagrant-\u0442\u0430\u0439 \u0431\u0430\u0440\u0430\u0433 \u0442\u04e9\u0441\u0442\u044d\u0439. \u0422\u044d\u0433\u044d\u0445\u0434\u044d\u044d Docker \u043d\u044c \u043e\u043b\u043e\u043d Linux based VM \u04af\u04af\u0441\u0433\u044d\u0445 \u04af\u0435\u0434 kernel-\u044d\u044d share \u0445\u0438\u0439\u0434\u044d\u0433 \u044e\u043c. \u0425\u044d\u0440\u0432\u044d\u044d \u0447\u0438 Linux \u0430\u0448\u0438\u0433\u043b\u0430\u0434\u0430\u0433 \u0431\u043e\u043b, \u0447\u0438\u043d\u0438\u0439 \u0430\u0448\u0438\u0433\u043b\u0430\u0436 \u0431\u0430\u0439\u0433\u0430\u0430 Linux-\u044b\u043d kernel-\u0438\u0439\u0433 \u0448\u0438\u043d\u044d\u044d\u0440 \u04af\u04af\u0441\u0433\u044d\u0445 OS-\u044b\u043d\u0445\u044d\u044d kernel-\u044b\u043d \u043e\u0440\u043e\u043d\u0434 \u0430\u0448\u0438\u0433\u043b\u0430\u043d\u0430 \u0433\u044d\u0441\u044d\u043d \u04af\u0433. Mac OS X \u0431\u043e\u043b\u043e\u043d, Windows-\u044b\u043d \u0445\u0443\u0432\u044c\u0434 kernel share \u0445\u0438\u0439\u0445 \u0431\u043e\u043b\u043e\u043c\u0436\u0433\u04af\u0439 \u0442\u0443\u043b, \u044d\u0445\u043b\u044d\u044d\u0434 VirtualBox-\u043e\u043e\u0440 Linux OS-\u0442\u044d\u0439 virtual machine \u04af\u04af\u0441\u0433\u044d\u044d\u0434, \u0442\u044d\u0440\u044d\u043d \u0434\u044d\u044d\u0440\u044d\u044d container \u04af\u04af\u0441\u0433\u044d\u044d\u0434 \u044f\u0432\u043d\u0430. Kernel-\u044d\u044d share \u0445\u0438\u0439\u0436 \u0431\u0430\u0439\u0433\u0430\u0430 \u0431\u043e\u043b\u043e\u0445\u043e\u043e\u0440, Vagrant-\u044b\u0433 \u0431\u043e\u0434\u0432\u043e\u043b \u0430\u0440\u0430\u0439 \u0445\u04e9\u043d\u0433\u04e9\u0445\u04e9\u043d \u0430\u0436\u0438\u043b\u043b\u0430\u043d\u0430. \u0422\u044d\u0433\u044d\u0445\u0434\u044d\u044d Mac OS X \u0431\u043e\u043b\u043e\u043d Windows \u0434\u044d\u044d\u0440 \u0430\u0448\u0438\u0433\u043b\u0430\u0445 \u0433\u044d\u0436 \u0431\u0430\u0439\u0433\u0430\u0430 \u0431\u043e\u043b, Vagrant-\u0430\u0430\u0441 \u044f\u043c\u0430\u0440 \u0447 \u044f\u043b\u0433\u0430\u0430\u0433\u04af\u0439. \u0425\u0430\u0440\u0438\u043d \u043e\u043b\u043e\u043d container \u04af\u04af\u0441\u0433\u044d\u0445 \u0433\u044d\u0436 \u0431\u0430\u0439\u0433\u0430\u0430 \u0431\u043e\u043b, Docker-\u043d\u044c \u0445\u0430\u043c\u0430\u0430\u0433\u04af\u0439 \u0438\u043b\u04af\u04af \u0431\u0430\u0439\u0445.<\/p>\n<p><strong>\u042d\u0446\u044d\u0441\u0442 \u043d\u044c<\/strong><br \/>\n2-\u0443\u0443\u043b\u0430\u0430 \u0441\u0443\u0440\u0430\u0445\u0430\u0434 \u043d\u044d\u044d\u0445 \u0445\u04af\u043d\u0434 \u0437\u04af\u0439\u043b \u0431\u0438\u0448 \u0431\u043e\u043b\u043e\u0445\u043e\u043e\u0440, \u0437\u0430\u0432\u0442\u0430\u0439 \u04af\u0435\u0434\u044d\u044d 2-\u0443\u0443\u043b\u0430\u043d\u0433 \u043d\u044c \u0442\u0443\u0440\u0448\u0438\u0436 \u04af\u0437\u044d\u0436 \u0431\u0430\u0439\u0433\u0430\u0430\u0434 \u0441\u0443\u0440\u0441\u0430\u043d \u043d\u044c \u0434\u044d\u044d\u0440. \u041c\u0430\u043d\u0430\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0445\u0443\u0432\u044c\u0434, Vagrant-\u0443\u0443\u0434\u0430\u0430 Dockerize \u0445\u0438\u0439\u0436 \u0431\u0430\u0439\u0433\u0430\u0430. \u0422\u044d\u0433\u044d\u0445\u0434\u044d\u044d &#8220;No Silver Bullet&#8221;. 2-\u0443\u0443\u043b\u0430\u043d\u0433 \u043d\u044c \u0441\u0443\u0440\u0447 \u0431\u0430\u0439\u0433\u0430\u0430\u0434, \u0445\u044d\u0440\u044d\u0433\u0446\u044d\u044d\u043d\u0434\u044d\u044d \u0442\u043e\u0445\u0438\u0440\u0443\u0443\u043b\u0436 \u0430\u043b\u0438\u0439\u0433 \u043d\u044c \u0430\u0448\u0438\u0433\u043b\u0430\u0445\u0430\u0430 \u0448\u0438\u0439\u0434\u0432\u044d\u043b \u0437\u04af\u0433\u044d\u044d\u0440.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0411\u0430\u0440\u0430\u0433 \u0431\u04af\u0445 startup \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0443\u0434 \u044d\u043d\u044d 2 tool-\u044b\u0433 \u0430\u0448\u0438\u0433\u043b\u0430\u0434\u0430\u0433 \u0431\u0430\u0439\u0445. Startup \u0433\u044d\u043b\u0442\u0433\u04af\u0439 \u0442\u043e\u043c\u0443\u0443\u0434 \u043d\u044c \u0447 \u0431\u0430\u0441 \u0430\u0448\u0438\u0433\u043b\u0430\u0434\u0430\u0433 \u0431\u0430\u0439\u0445 \u043b \u0434\u0430\u0430. \u042f\u043c\u0430\u0440 \u0442\u043e\u0445\u0438\u043e\u043b\u0434\u043e\u043b\u0434 \u0430\u0448\u0438\u0433\u043b\u0430\u0432\u0430\u043b \u0437\u04af\u0433\u044d\u044d\u0440 \u0432\u044d \u0433\u044d\u0434\u0433\u0438\u0439\u0433 \u0445\u0430\u043b\u044c\u0442&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=\/wp\/v2\/posts\/183"}],"collection":[{"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=183"}],"version-history":[{"count":5,"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=\/wp\/v2\/posts\/183\/revisions"}],"predecessor-version":[{"id":187,"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=\/wp\/v2\/posts\/183\/revisions\/187"}],"wp:attachment":[{"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.barbayar.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}