All tools / Docker Compose examples
Apache HTTP Server with Docker Compose
Apache httpd serving files from a local folder.
compose.yaml
services:
apache:
image: httpd:2.4
restart: unless-stopped
ports:
- "8080:80"
volumes:
- ./htdocs:/usr/local/apache2/htdocs:ro
How to use it
Commands
docker compose up -d docker compose ps docker compose logs -f
- Put your site in a folder named htdocs next to compose.yaml, then open http://localhost:8080.
Prefer Kubernetes? See the Apache HTTP Server Kubernetes version.