{"id":1016,"date":"2023-11-13T22:03:53","date_gmt":"2023-11-13T13:03:53","guid":{"rendered":"https:\/\/shinke1987.net\/?p=1016"},"modified":"2023-11-13T22:03:53","modified_gmt":"2023-11-13T13:03:53","slug":"xdebug%e3%82%92%e4%bd%bf%e3%81%88%e3%82%8b%e3%82%88%e3%81%86%e3%81%abdocker%e3%82%bb%e3%83%83%e3%83%88%e3%82%a2%e3%83%83%e3%83%97","status":"publish","type":"post","link":"https:\/\/shinke1987.net\/?p=1016","title":{"rendered":"xDebug\u3092\u4f7f\u3048\u308b\u3088\u3046\u306bDocker\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7"},"content":{"rendered":"\n<p>\u524d\u56de\u306e\u3082\u306e\u304b\u3089xDebug\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u3002<br>\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c\u304c\u3067\u304d\u308b\u3068\u3053\u308d\u307e\u3067\u306f\u78ba\u8a8d\u6e08\u307f\u3002<\/p>\n\n\n\n<p>IDE\u304c\u30b5\u30fc\u30d0\u3001xDebug\u304c\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-shinke-1987-net wp-block-embed-shinke-1987-net\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"vxAGqCJYCf\"><a href=\"https:\/\/shinke1987.net\/?p=995\">Docker\u30b3\u30f3\u30c6\u30ca\u3092\u5229\u7528\u3057\u3066Laravel + PostgreSQL \u74b0\u5883\u3092\u4f5c\u3063\u305f\u6642\u306e\u30ed\u30b0<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Docker\u30b3\u30f3\u30c6\u30ca\u3092\u5229\u7528\u3057\u3066Laravel + PostgreSQL \u74b0\u5883\u3092\u4f5c\u3063\u305f\u6642\u306e\u30ed\u30b0&#8221; &#8212; shinke1987.net\" src=\"https:\/\/shinke1987.net\/?p=995&#038;embed=true#?secret=cNmMo4f7uV#?secret=vxAGqCJYCf\" data-secret=\"vxAGqCJYCf\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 id=\"toc0\" class=\"wp-block-heading\">\u624b\u9806<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3057\u3066\u3001\u65e2\u5b58\u306edocker-compose.yml\u3092\u5229\u7528\u3057\u3066\u3001<br>docker compose up -d \u3068\u30b3\u30de\u30f3\u30c9\u3092\u53e9\u3044\u3066\u3001IDE\u3092\u8a2d\u5b9a\u3059\u308c\u3070\u826f\u3044\u3002<\/p>\n\n\n\n<h2 id=\"toc1\" class=\"wp-block-heading\">docker-php-ext-xdebug.ini<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u5185\u5bb9\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nzend_extension=xdebug\nxdebug.client_host=host.docker.internal\nxdebug.client_port = 9003\nxdebug.mode=develop,coverage,debug,gcstats,profile,trace\nxdebug.start_with_request=yes\n<\/pre><\/div>\n\n\n<h2 id=\"toc2\" class=\"wp-block-heading\">000-default.conf<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u884c\u3092\u8ffd\u52a0\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDirectoryIndex index.php\n<\/pre><\/div>\n\n\n<h2 id=\"toc3\" class=\"wp-block-heading\">Dockerfile<\/h2>\n\n\n\n<p>\u6700\u5f8c\u306exDebug\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc\u90e8\u5206\u3060\u3051\u8ffd\u52a0\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\nFROM php:8.2.11-apache\nLABEL authors=&quot;shinke1987&quot;\n\n# Composer\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\n# Composer\u306e\u516c\u5f0f\u30da\u30fc\u30b8\u304b\u3089\u5f15\u7528\u3002\nCOPY --from=composer\/composer:latest-bin \/composer \/usr\/bin\/composer\n\n# \u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3002\nRUN apt-get update\nRUN apt-get -y install less git unzip\n\n# \u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u306e\u8a2d\u5b9a\nRUN cp \/usr\/share\/zoneinfo\/Asia\/Tokyo \/etc\/localtime\n\n# pdo_pgsql\u3067\u5fc5\u8981\u3002\nRUN apt-get -y install libpq-dev\n\n# apachectl status \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u306b\u5fc5\u8981\u3002\nRUN apt-get -y install lynx\n\n# Apache\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3002\nCOPY .\/apache2.conf \/etc\/apache2\/\nCOPY .\/000-default.conf \/etc\/apache2\/sites-available\/\n\n# PHP\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3002\nCOPY .\/php.ini \/usr\/local\/etc\/php\/\n\n# Laravel\u3067\u5fc5\u8981\u306aPHP\u306e\u62e1\u5f35\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8a2d\u5b9a\u3002\nRUN docker-php-ext-install pdo_pgsql\n\n# xDebug\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\nRUN pecl install xdebug-3.2.2\n# xDebug\u8a2d\u5b9a\u3002\nRUN docker-php-ext-enable xdebug\n# xDebug\u7528\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3002\nCOPY .\/docker-php-ext-xdebug.ini \/usr\/local\/etc\/php\/conf.d\/\n\n\n# Apache\u8d77\u52d5\u3002\nCMD &#x5B;&quot;apache2-foreground&quot;]\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306e\u3082\u306e\u304b\u3089xDebug\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u3002\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c\u304c\u3067\u304d\u308b\u3068\u3053\u308d\u307e\u3067\u306f\u78ba\u8a8d\u6e08\u307f\u3002 IDE\u304c\u30b5\u30fc\u30d0\u3001xDebug\u304c\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u306a\u308b\u3002 \u624b\u9806 \u4e0b\u8a18\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3057\u3066\u3001\u65e2\u5b58\u306edocker-compose.yml\u3092 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97],"tags":[98,81],"class_list":["post-1016","post","type-post","status-publish","format-standard","hentry","category-docker","tag-docker","tag-php"],"_links":{"self":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1016"}],"version-history":[{"count":4,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1016\/revisions"}],"predecessor-version":[{"id":1020,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1016\/revisions\/1020"}],"wp:attachment":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}