Browse Source

Merge pull request #19897 from smil2k/bug/19896

fix docker build setup
Laurent Destailleur 3 năm trước cách đây
mục cha
commit
909c974bad
3 tập tin đã thay đổi với 10 bổ sung11 xóa
  1. 7 9
      build/docker/Dockerfile
  2. 3 0
      build/docker/docker-compose.yml
  3. 0 2
      htdocs/install/default.css

+ 7 - 9
build/docker/Dockerfile

@@ -39,15 +39,13 @@ RUN chmod +x /usr/local/bin/docker-run.sh
 
 RUN pecl install xdebug && docker-php-ext-enable xdebug
 RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
-RUN echo 'xdebug.remote_autostart=1' >> ${PHP_INI_DIR}/php.ini
-RUN echo 'xdebug.remote_enable=1' >> ${PHP_INI_DIR}/php.ini
-RUN echo 'xdebug.default_enable=1' >> ${PHP_INI_DIR}/php.ini
-#RUN echo 'xdebug.remote_host=docker.host' >> ${PHP_INI_DIR}/php.ini
-RUN echo 'xdebug.remote_port=9000' >> ${PHP_INI_DIR}/php.ini
-RUN echo 'xdebug.remote_connect_back=1' >> ${PHP_INI_DIR}/php.ini
-RUN echo 'xdebug.profiler_enable=0' >> ${PHP_INI_DIR}/php.ini
-RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
-#RUN echo 'localhost docker.host' >> /etc/hosts
+RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
+RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
+RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
+RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
+RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
+#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
+RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
 
 # set up sendmail config, to use maildev
 RUN echo "account default" > /etc/msmtprc

+ 3 - 0
build/docker/docker-compose.yml

@@ -46,6 +46,9 @@ services:
         networks:
             - internal-pod
             - external-pod
+        extra_hosts:
+            - "localhost.localdomain:127.0.0.1"
+            - "host.docker.internal:host-gateway"
 
     mail:
         image: maildev/maildev

+ 0 - 2
htdocs/install/default.css

@@ -473,5 +473,3 @@ table.tablesupport {
 		width: 100%;
 	}
 }
-	
-}