Apache + PHP Server designed for local development environments.
1.8K
This container is designed to be used for local development. As such, it has not been hardened as required for a production environment.
This container implements an Apache + PHP 8.1 server. See the list of features below to
understand what this container offers over the stock php:<version>-apache container.
The compiled versions of this container can be found in the Docker registry.
STDOUTThis image uses environment variables to allow the configuration of some parameters at run time:
TIMEZONEAmerica/New_YorkVOLUME_PATH/var/www/htmlXDEBUG_REMOTE_HOSThost.docker.internal. See the
Docker documentation
for information regarding this DNS name.XDEBUG_REMOTE_PORT9003. See the
Docker documentation
for information regarding this DNS name.SERVER_HOSTNAMElocal.dev9003 on the Xdebug client computer as the
Xdebug client computer's firewall will likely block this traffic.TERMxtermWP_CACHE_MEMCACHED_ADDRmemcached:11211There are no official volumes in this container. However, here are some recommended locations to attach volumes.
/var/www/html - The path from which Apache serves up files./etc/pki/tls - Used for SSL signing80 inbound - Apache listens on this port.TCP 9003 outbound - If XDEBUG_REMOTE_PORT is defined to be something else, then that
outbound port must be opened. Xdebug events are sent from the container to the address defined
by the XDEBUG_REMOTE_HOST environment variable. This does not need to be opened in the
Docker firewall. However, this port may need to be opened on the inbound firewall of the
computer that is receiving the Xdebug events.If you are wanting to use SSL (port 443), the following certificate files must exist:
/etc/pki/tls/cert/cert.pem - Corresponds to the Apache SSLCertificateFile
file./etc/pki/tls/private/privkey.pem - Corresponds to the Apache SSLCertificateKeyFile
file.docker run --rm -v /home/jdoe/project/html:/var/www/html -v /home/jdoe/.letsencrypt:/etc/pki/tls \
-t wildscamp/php
172.25.64.1.docker run --rm -v /home/jdoe/project/html:/var/www/html -v /home/jdoe/.letsencrypt:/etc/pki/tls \
-e "XDEBUG_REMOTE_HOST=172.25.64.1" \
-t wildscamp/php
services:
mysql:
# Mysql container definition
php:
image: wildscamp/php
environment:
- TIMEZONE=America/New_York
- XDEBUG_REMOTE_HOST=host.docker.internal
- WP_CACHE_MEMCACHED_ADDR=memcached:11211
ports:
- "80:80"
- "443:443"
working_dir: /var/www/html
volumes:
- ./html:/var/www/html
- ./certificates:/etc/pki/tls
links:
- mysql:db
restart: on-failure
Content type
Image
Digest
Size
195.9 MB
Last updated
about 4 years ago
docker pull wildscamp/php