This is a simple bash script: #!/usr/bin/env bash We use a bash script named start-container as the default command for the image. So, we'll see xdebug.remote_host=192.168.1.2 in xdebug.ini for now. This means the container is reaching out of the container to my host machine to send debugging information. We use my Mac's private network IP address for the remote_host, as this configuration is telling xdebug where to reach PHPStorm, which will be listening on my host machine for xdebug connections. RUN chmod +x usr/local/bin/start-containerĬMD File xdebug.ini zend_extension=xdebug.so & rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*ĬOPY xdebug.ini /etc/php/7.0/mods-available/xdebug.iniĬOPY start-container /usr/local/bin/start-container & apt-get remove -y -purge software-properties-common \
& php -r 'readfile('') ' | php -install-dir=/usr/bin/ -filename=composer \
Php7.0-pgsql php7.0-imap php-memcached php7.0-mbstring php7.0-xml php7.0-curl \ & apt-get install -y php7.0-fpm php7.0-cli php7.0-mcrypt php7.0-gd php7.0-mysql \ & apt-get install -y curl zip unzip git software-properties-common sqlite3 \ A script to use as a CMD (to start off a process).A Dockerfile to build an image with Xdebig.