Custom docker images for PHP/MySQL Applications
- apache
- php (7.4)
- mysql (5.7)
This update has SSL support. You will need to create SSL certificate for this and
place them under apache\ssl
folder.
$ docker image build --no-cache -f php74.Dockerfile -t php74-apache-ssl-dev .
$ docker image build --no-cache -f mysql57.Dockerfile -t mysql57-dev .
$ docker-compose up -d
$ docker-compose down
$ docker exec -it ${CONTAINER_PREFIX}-apache-webserver /bin/bash
$ docker exec -it ${CONTAINER_PREFIX}-mysql /bin/bash
Add following entry in /etc/hosts
file
127.0.0.1 website.local
Access via HTTP using http://website.local:8080
Access via HTTPS using https://website.local:8443
{
"name": "Listen for XDebug on Docker",
"type": "php",
"request": "launch",
"port": 9000,
"log": true,
"externalConsole": false,
"stopOnEntry": false,
"pathMappings": {
"/var/www": "${workspaceFolder}/src"
},
}