Docker Image for Apache on Debian 11 (Bullseye)
904
Maintained by: raasss
Issues can be filed at GitHub Issues.
Supported architectures are: linux/amd64, linux/arm/v7, linux/arm64
Source of this content can be found at README.docker.io.md
FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features (mostly) useful for heavy-loaded sites. (more info)
Starting a Apache instance with the latest version is simple via docker-compose. If you don't have docker-compose tool installed, please go here and follow instractions.
Example docker-compose.yml for apache:
version: '3.7'
networks:
private:
driver: bridge
services:
apache:
image: raasss/apache-debian-11:latest
networks:
- private
ports:
- "80"
volumes:
- type: bind
source: ./htdocs
target: /var/www/html
read_only: true
In your current working directory create docker-compose.yml file. Create also directory htdocs/ and populate it with some .html files. This will be root directory for local website development.
Run docker-compose and services should be up soon:
$ docker-compose up -d
We can find port where apache listen for connections like this:
$ docker-compose port apache 80
0.0.0.0:49154
In this example we can go to web browser and type in url like http://0.0.0.0:49154.
The docker-compose exec command allows you to run commands inside a Docker container.
The following command line will give you a bash shell inside your apache container as root:
$ docker-compose exec apache bash
The log is available through Docker's container log:
$ docker-compose logs apache -f
You can omit -f if you don't want to tail logs in realtime.
As most common usage of Apache is as PHP Fast-CGI proxy, following environment variables are supported.
PHP_FPM_SERVERHostname where PHP-FPM listens to. Default value is php-fpm-server.
PHP_FPM_PORTPort where PHP-FPM listens to. Default value is 9000.
PHP_FPM_PING_URLURL path where PHP-FPM ping is. Default value is /ping.
PHP_FPM_STATUS_URLURL path where PHP-FPM status is. Default value is /status.
Content type
Image
Digest
Size
84.8 MB
Last updated
over 4 years ago
docker pull raasss/apache-debian-11