久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='DOUlL'><tr id='DOUlL'><dt id='DOUlL'><q id='DOUlL'><span id='DOUlL'><b id='DOUlL'><form id='DOUlL'><ins id='DOUlL'></ins><ul id='DOUlL'></ul><sub id='DOUlL'></sub></form><legend id='DOUlL'></legend><bdo id='DOUlL'><pre id='DOUlL'><center id='DOUlL'></center></pre></bdo></b><th id='DOUlL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DOUlL'><tfoot id='DOUlL'></tfoot><dl id='DOUlL'><fieldset id='DOUlL'></fieldset></dl></div>

      <bdo id='DOUlL'></bdo><ul id='DOUlL'></ul>

    1. <tfoot id='DOUlL'></tfoot>

      <small id='DOUlL'></small><noframes id='DOUlL'>

        <legend id='DOUlL'><style id='DOUlL'><dir id='DOUlL'><q id='DOUlL'></q></dir></style></legend>

      1. 從容器內(nèi)獲取 docker 網(wǎng)絡(luò)的私有 ip 以配置 xdebug

        Geting the private ip for the docker network from within the container to configure xdebug remote_host(從容器內(nèi)獲取 docker 網(wǎng)絡(luò)的私有 ip 以配置 xdebug remote_host)
          <bdo id='gcAmz'></bdo><ul id='gcAmz'></ul>

                • <small id='gcAmz'></small><noframes id='gcAmz'>

                • <legend id='gcAmz'><style id='gcAmz'><dir id='gcAmz'><q id='gcAmz'></q></dir></style></legend>
                  <i id='gcAmz'><tr id='gcAmz'><dt id='gcAmz'><q id='gcAmz'><span id='gcAmz'><b id='gcAmz'><form id='gcAmz'><ins id='gcAmz'></ins><ul id='gcAmz'></ul><sub id='gcAmz'></sub></form><legend id='gcAmz'></legend><bdo id='gcAmz'><pre id='gcAmz'><center id='gcAmz'></center></pre></bdo></b><th id='gcAmz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gcAmz'><tfoot id='gcAmz'></tfoot><dl id='gcAmz'><fieldset id='gcAmz'></fieldset></dl></div>

                  <tfoot id='gcAmz'></tfoot>

                    <tbody id='gcAmz'></tbody>
                  本文介紹了從容器內(nèi)獲取 docker 網(wǎng)絡(luò)的私有 ip 以配置 xdebug remote_host的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  所以使用 docker 和 docker-compose 我喜歡提供內(nèi)置到容器中的工具,這樣開發(fā)團隊中的其他人就不必為設(shè)置零碎而煩惱.在這種特定情況下,我在配置 xdebug 時遇到了問題.從瀏覽器調(diào)試時,使用回連功能絕對正常.但是試圖讓 xdebug 通過容器內(nèi)的 cli 工作絕對是一場噩夢.出于某種原因,它需要(連同 remote_autostart=1)remote_host 設(shè)置來指向 docker 容器所在的網(wǎng)絡(luò).

                  So using docker and docker-compose I like to provide tools built into the containers so that other people in the development team don't have to struggle with setting up bits and bobs. In this specific case I'm having issues configuring xdebug. It works absolutely fine using connect back when debugging from a browser. But trying to get xdebug working through the cli inside the container is being an absolute nightmare. For some reason it requires (along with remote_autostart=1) the remote_host setting to point to the network the docker container is in.

                  這是我當(dāng)前的解決方案,它在我的 ~/.bashrc 中,它可以工作,但很糟糕.它的工作原理是假設(shè)網(wǎng)絡(luò) ip 只是容器 ip,但最后一位數(shù)字被替換為 1.我希望有人有更好的方法讓 xdebug 工作,或者有更好的方法來獲取網(wǎng)絡(luò) ip.

                  This is my current solution which is in my ~/.bashrc, and it works, but it's horrible. It works off of the assumption that the network ip will just be the containers ip but the last digit is replaced with a 1. I'm hoping someone has a better way to get xdebug working or a nicer way to fetch the network ip.

                  # If xdebug doesn't get provided a remote address then it will default to this. This is the case for cli debugging. 
                  # This ip should be the network this container is running on
                  own_private=$(hostname -i | awk '{print $1}')
                  # Replaces the final number from the containers own private ip with a 1 for the network address
                  network="${own_private%.*}.1"
                  # For some reason xdebug won't work unless you give it the network ip
                  export XDEBUG_CONFIG="remote_host=$network"
                  

                  Xdebug 設(shè)置:

                  [xdebug]
                  zend_extension=xdebug.so
                  xdebug.remote_enable = 1
                  xdebug.remote_connect_back = 1
                  xdebug.remote_port = 9000
                  xdebug.show_local_vars = 0
                  xdebug.var_display_max_data = 10000
                  xdebug.var_display_max_depth = 20
                  xdebug.show_exception_trace = 0
                  xdebug.remote_autostart=1
                  xdebug.idekey = "PHPSTORM"
                  xdebug.remote_log = /srv/www/var/log/xdebug.log
                  xdebug.profiler_enable = 0;
                  xdebug.profiler_enable_trigger = 1;
                  xdebug.profiler_output_dir = /srv/www/var/profiler/
                  

                  推薦答案

                  可以使用默認(rèn)網(wǎng)關(guān)的 IP 地址(即 docker0 網(wǎng)絡(luò)的 IP)從容器內(nèi)部訪問主機主機上的接口).使用ip獲取:

                  The host can be accessed from within the container using the IP address of the default gateway (that is the IP of the docker0 network interface on host). Use ip to get it:

                  ip route show default | awk '/default/ {print $3}'
                  

                  這篇關(guān)于從容器內(nèi)獲取 docker 網(wǎng)絡(luò)的私有 ip 以配置 xdebug remote_host的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動程序)

                  • <small id='4Y2ib'></small><noframes id='4Y2ib'>

                    <legend id='4Y2ib'><style id='4Y2ib'><dir id='4Y2ib'><q id='4Y2ib'></q></dir></style></legend>
                      <tfoot id='4Y2ib'></tfoot>
                        <bdo id='4Y2ib'></bdo><ul id='4Y2ib'></ul>
                          <i id='4Y2ib'><tr id='4Y2ib'><dt id='4Y2ib'><q id='4Y2ib'><span id='4Y2ib'><b id='4Y2ib'><form id='4Y2ib'><ins id='4Y2ib'></ins><ul id='4Y2ib'></ul><sub id='4Y2ib'></sub></form><legend id='4Y2ib'></legend><bdo id='4Y2ib'><pre id='4Y2ib'><center id='4Y2ib'></center></pre></bdo></b><th id='4Y2ib'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4Y2ib'><tfoot id='4Y2ib'></tfoot><dl id='4Y2ib'><fieldset id='4Y2ib'></fieldset></dl></div>

                            <tbody id='4Y2ib'></tbody>

                            主站蜘蛛池模板: 亚洲欧美日韩中文在线 | 自拍偷拍中文字幕 | 国产99免费视频 | 日本久久精品视频 | 日本精品裸体写真集在线观看 | 韩国精品一区 | 欧美视频一区二区三区 | 中文字幕亚洲欧美 | 美女日皮网站 | 成人在线视频一区 | 在线中文字幕视频 | 国产日韩欧美在线观看 | av片在线观看 | 精品一区二区三区四区 | 日本aa毛片a级毛片免费观看 | 国产三级精品三级在线观看四季网 | 国产高清一区二区 | 日韩在线播放第一页 | 天堂成人国产精品一区 | 久久久久资源 | 亚洲精品久久久久久久久久久久久 | av毛片 | 成人免费一级视频 | 国产午夜久久久 | 在线观看日本高清二区 | av第一页| 亚洲一区免费视频 | 午夜视频免费 | 亚洲免费人成在线视频观看 | 欧美精品一区二区三区在线四季 | 成人欧美一区二区三区在线播放 | 在线黄 | 欧美性猛交一区二区三区精品 | 亚洲欧洲视频 | 国产精品无码久久久久 | 欧美视频在线播放 | 国产欧美在线播放 | 麻豆国产一区二区三区四区 | 欧美日韩在线一区二区三区 | 一级毛片在线视频 | 91欧美精品成人综合在线观看 |