{"id":4072,"date":"2021-10-02T16:55:43","date_gmt":"2021-10-02T07:55:43","guid":{"rendered":"https:\/\/tech.akat.info\/?p=4072"},"modified":"2021-10-02T16:55:43","modified_gmt":"2021-10-02T07:55:43","slug":"%e4%bb%8a%e3%81%93%e3%81%9d%e6%b7%b1%e5%a0%80%e3%82%8a%e3%81%99%e3%82%8b%e3%80%81php%e3%81%aedocker%e3%82%a4%e3%83%a1%e3%83%bc%e3%82%b8%e3%82%92%e8%a6%96%e8%81%b4%e3%81%97%e3%81%9f-phpcon-2021","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=4072","title":{"rendered":"\u4eca\u3053\u305d\u6df1\u5800\u308a\u3059\u308b\u3001PHP\u306eDocker\u30a4\u30e1\u30fc\u30b8\u3092\u8996\u8074\u3057\u305f -phpcon-2021-"},"content":{"rendered":"<p><a href=\"https:\/\/fortee.jp\/phpcon-2021\">PHP Conference Japan 2021<\/a>\u306b\u3066\u3001<a href=\"https:\/\/fortee.jp\/phpcon-2021\/proposal\/ed5fa3e1-2bd4-41a1-b3a7-a183c3b3a12c\">\u4eca\u3053\u305d\u6df1\u5800\u308a\u3059\u308b\u3001PHP\u306eDocker\u30a4\u30e1\u30fc\u30b8<\/a>\u3092\u8996\u8074\u3057\u305f\u3002\u305d\u306e\u6642\u306e\u30e1\u30e2\u3002(\u8cc7\u6599\uff1ahttps:\/\/speakerdeck.com\/rukiadia\/understand-php-docker)<\/p>\n<h2>\u516c\u5f0f\u30a4\u30e1\u30fc\u30b8\u3092\u5229\u7528\u3059\u3079\u3057<\/h2>\n<p>\u307e\u305a\u306f<a href=\"https:\/\/hub.docker.com\/_\/php\">\u516c\u5f0f\u30a4\u30e1\u30fc\u30b8<\/a>\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3002<br \/>\n<a href=\"https:\/\/github.com\/docker-library\/docs\/blob\/master\/php\/README.md#supported-tags-and-respective-dockerfile-links\">\u516c\u5f0f\u30a4\u30e1\u30fc\u30b8\u30bf\u30b0\u4e00\u89a7<\/a>\u304b\u3089\u3001\u30a4\u30e1\u30fc\u30b8\u9078\u5b9a\u30dd\u30a4\u30f3\u30c8\u306f\u4ee5\u4e0b\u3068\u306a\u308b\u3002<\/p>\n<h3>\u30d9\u30fc\u30b9\u30a4\u30e1\u30fc\u30b8\u3092\u3069\u3046\u3059\u308b\u304b<\/h3>\n<p>Debian \/ Alpine Linux\u306e\u9078\u629e\u80a2\u304c\u3042\u308b\u304c Debian \u304c\u7121\u96e3\u3002<br \/>\nAlpine Linux\u306f busybox (\u7d44\u307f\u8fbc\u307f\u7cfb\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3)\u3092\u3082\u3068\u306b\u4f5c\u6210\u3055\u308c\u305f\u3002\u30a4\u30e1\u30fc\u30b8\u30b5\u30a4\u30ba\u306f\u5c0f\u3055\u3044\u304c\u3001\u4ed6\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3068\u6bd4\u8f03\u3059\u308b\u3068\u6319\u52d5\u304c\u9055\u3063\u305f\u308a\u4e92\u63db\u6027\u306b\u6b20\u3051\u308b\u9762\u304c\u3042\u308b\u305f\u3081\u3001\u5165\u5ff5\u306a\u691c\u8a3c\u304c\u5fc5\u8981\u3002<\/p>\n<h3>Web\u30b5\u30fc\u30d0\u304c\u5fc5\u8981\u304b\u3069\u3046\u304b<\/h3>\n<p>Web\u30b5\u30fc\u30d0\u304c\u4e0d\u8981\u3067\u3042\u308c\u3070<version>-cli \u3092\u5229\u7528\u3059\u308b\u3002\u5fc5\u8981\u3067\u3042\u308c\u3070<version>-apache \u3092\u5229\u7528\u3059\u308b\u3002<br \/>\n\u203bnginx\u306f\u516c\u5f0f\u63d0\u4f9b\u3055\u308c\u3044\u3066\u3044\u306a\u3044\u305f\u3081\u3002\u305d\u306e\u5834\u5408\u306f nginx + php-fpm \u3068\u30b3\u30f3\u30c6\u30ca\u304c\u8907\u6570\u5fc5\u8981\u3068\u306a\u308b\u3002<\/p>\n<h3>PHP-FPM\u3092\u5229\u7528\u3059\u308b\u304b\u3069\u3046\u304b<\/h3>\n<p><version>-fpm \u7cfb\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u5229\u7528\u3059\u308b\u3002\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u3092\u7528\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<h2>CakePHP\u3092\u52d5\u4f5c\u3055\u305b\u308bDockefile\u4f8b<\/h2>\n<p><a href=\"https:\/\/github.com\/rukiadia\/php-sample-docker\">CakePHP\u3092\u52d5\u304b\u3059\u624b\u9806<\/a>\u306eDockerfile\u306b\u3064\u3044\u3066<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nFROM php:8.0-fpm\r\n\r\nRUN apt update\r\n# \u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30d3\u30eb\u30c9\u306b\u5fc5\u8981\u306a\u305f\u3081\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002\r\nRUN apt install -y git zip unzip libicu-dev\r\n\r\n# \u516c\u5f0f\u306e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u64cd\u4f5c\u30c4\u30fc\u30eb\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u306a\u3044\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3082\u5b58\u5728\u3059\u308b\u3002\r\nRUN docker-php-ext-install pdo_mysql intl\r\n\r\n# install composer\r\nCOPY --from=composer:2.0.12 \/usr\/bin\/composer \/usr\/bin\/composer\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PHP Conference Japan 2021\u306b\u3066\u3001\u4eca\u3053\u305d\u6df1\u5800\u308a\u3059\u308b\u3001PHP\u306eDocker\u30a4\u30e1\u30fc\u30b8\u3092\u8996\u8074\u3057\u305f\u3002\u305d\u306e\u6642\u306e\u30e1\u30e2\u3002(\u8cc7\u6599\uff1ahttps:\/\/speakerdeck.com\/rukiadia\/understan [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[35,9],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/4072"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4072"}],"version-history":[{"count":1,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/4072\/revisions"}],"predecessor-version":[{"id":4073,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/4072\/revisions\/4073"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}