PHP 8.2 and Apache 2.4 with Let's Encrypt support.
10K+
Combined PHP + Apache2 image using mod_php. This image is recommended for backend applications such as APIs which do not need to serve static assets. While it will work for small to medium sized general purpose applications like WordPress, it will not perform as well as a php-fpm configuration due to the way that Apache prefork functions.
Apache HTTP Server Version 2.4
X-Forwarded-For support for default docker subnet/var/www/var/wwwwww-data uses the same UID as the ubuntu accountrewrite, headers, ssl, remoteipPHP 8.4 and the latest version of composer as of the image build date.
Extensions:
cli, common, dev, readline, json, curlbz2, zipmysql, pgsql, sqlite3, memcached, redisxdebug*bcmath, gmpigbinary, opcachegd, imap, intl, mbstring, soap, xml, xsl* xdebug is only enabled if the environment variable XDEBUG_ENABLE=1.
LETS_ENCRYPT_ environment variables are optional.
See also andrewmackrodt/php and andrewmackrodt/apache2.
# create the container
docker create \
--name mysite \
-p 8080:80 \
-p 8443:443 \
-e PUID=$(id -u) \
-e PGID=(id -g) \
-e LETS_ENCRYPT_DOMAINS=97e0973.ngrok.io \
-e [email protected] \
-e LETS_ENCRYPT_STAGING=0 \
-e XDEBUG_ENABLE=0 \
-v $HOME/public_html:/var/www/html \
-v $HOME/.certbot/mysite:/etc/letsencrypt/live \
andrewmackrodt/php-apache2
| Parameter | Function |
|---|---|
-p 8080:80 | Expose port 80 on the host |
-p 8443:443 | Expose port 443 on the host |
-e PUID=1000 | The user id, recommended: $(id -u) |
-e PGID=1000 | The group id, recommended: $(id -g) |
-e SUDO_NOPASSWD=0 | Set to 1 to allow passwordless sudo |
-e LETS_ENCRYPT_DOMAINS= | Domain's to request certificates for, comma separated |
-e LETS_ENCRYPT_EMAIL= | E-mail address to receive Let's Encrypt Notifications |
-e LETS_ENCRYPT_STAGING=0 | Set to "1" to use staging server |
-e XDEBUG_ENABLE=0 | Set to "1" to enable xdebug |
-v /var/www/html | Apache DocumentRoot |
-v /etc/letsencrypt/live | Certbot Let's Encrypt directory |
Content type
Image
Digest
sha256:baf4e8bbc…
Size
185.5 MB
Last updated
4 months ago
docker pull andrewmackrodt/php-apache2