久久久久久久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. 從容器內獲取 docker 網絡的私有 ip 以配置 xdebug

        Geting the private ip for the docker network from within the container to configure xdebug remote_host(從容器內獲取 docker 網絡的私有 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>
                  本文介紹了從容器內獲取 docker 網絡的私有 ip 以配置 xdebug remote_host的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

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

                  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.

                  這是我當前的解決方案,它在我的 ~/.bashrc 中,它可以工作,但很糟糕.它的工作原理是假設網絡 ip 只是容器 ip,但最后一位數字被替換為 1.我希望有人有更好的方法讓 xdebug 工作,或者有更好的方法來獲取網絡 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 設置:

                  [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/
                  

                  推薦答案

                  可以使用默認網關的 IP 地址(即 docker0 網絡的 IP)從容器內部訪問主機主機上的接口).使用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}'
                  

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

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

                  相關文檔推薦

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

                  • <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精品免费在线观看 | 免费看大片bbbb欧美 | 青青草在线视频免费观看 | 亚洲天堂成人在线视频 | 亚洲巨乳自拍在线视频 | 欧美一区二区在线 | 国产高清在线 | 国产成人福利在线观看 | 国产精品免费视频一区 | 国产精品国产精品 | 男女激情网站免费 | 天堂久久天堂综合色 | 91在线视频一区 | 国产成人精品福利 | 成人小视频在线观看 | 亚洲成网站 | www.亚洲一区 | 国产一区在线视频 | 精品国产乱码久久久久久牛牛 | 日韩欧美在线播放 | 亚洲 欧美 日韩在线 | 麻豆久久久久久久 | 久久美女网 | 欧美日韩国产欧美 | 国产成都精品91一区二区三 | 国产综合视频 | 日韩成人在线观看 | 亚洲精品视频网站在线观看 | 99re在线视频观看 | 欧美一级大黄 | 爱综合| 99国产精品久久久久 | 欧美激情精品久久久久久变态 | 国产激情在线播放 | 男女网站在线观看 | 一区欧美 | 新91视频网| 日韩免费网站 | 亚洲黄色视屏 |