I created this repository for other developers who may be looking to build this a similar dev infra. (php-fpm 5.6, apache, mysql, https)
- httpd:2.4-alpine
- mariadb:10
- php:5.6-fpm-alpine
- lscr.io/linuxserver/phpmyadmin:latest
The following modules are enabled by this image in addition to what the official php docker images provide
- bash
- zip
- unzip
- curl
- nodejs
- npm
- socache_shmcb_module
- mod_headers
- ssl_module
- expires_module
- rewrite_module
- mod_deflate
- mod_proxy
- mod_proxy_fcgi
- apcu
- bcmath
- bz2
- exif
- gd
- gmp
- iconv
- imagick
- intl
- mcrypt
- mysqli
- pdo_mysql
- pdo_pgsql
- pgsql
- redis
- soap
- ssh2
- xdebug
- zend-opcache
- zip
memory_limit = 512M
date.timezone = Europe/Paris
make dev
site -> https://localhost/
phpmyadmin -> http://localhost:8081/
make enter
make kill
make nodev
ops/docker/.env
ops/docker/mysql/sample/schema.sql
ops/docker/php/config/php.ini
ops/docker/php/config/php-fpm.conf
ops/docker/php/config/xdebug.ini
ops/docker/apache/config/apache.vhost.conf
ops/docker/apache/config/httpd-ssl.conf
ops/docker/apache/certificates/certificate.pem
ops/docker/apache/certificates/certificate-key.pem
You can generate your own self-Signed Certificate:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfsigned.key -out selfsigned.crt
You can follow the steps from this tutorial but be aware that some xdebug variable can differ.
Step 1: Connect docker to phpstorm
Settings > Build, Execution, Deployment > Docker
click sign + -> write any name you want like "Docker" or "My Docker Integration"
leave all the default options -> apply -> ok
Step 2: Configure a PHP servers (https)
Settings > PHP > Servers
click sign + -> set this configuration:
Name: docker - server
Localhost: localhost
Port: 443
check -> use paths mappings
folder src -> /var/www/html
Step 3: Configure a PHP servers (none https)
Settings > PHP > Servers
click sign + -> set this configuration:
Name: docker - server - none https
Localhost: localhost
Port: 80
check -> use paths mappings
folder src -> /var/www/html