Skip to content

Docker

Error Pages is one container with no dependencies. It listens on port 8080 and needs no configuration to start.

Terminal window
docker run --name error-pages -p 8080:8080 noixdev/error-pages

Open http://localhost:8080/502.html in a browser. Any code works: /404.html, /503.html and so on. The maintenance page is at /maintenance.html and the internal-only page at /internal.html. Add ?lang=de to pick a language.

Configure it with environment variables:

Terminal window
docker run --name error-pages -p 8080:8080 -e THEME=terminal -e LANGUAGES=en,de noixdev/error-pages
services:
error-pages:
image: noixdev/error-pages
container_name: error-pages
restart: unless-stopped
read_only: true
environment:
THEME: glass
LANGUAGES: de,en,pl,fr
DEFAULT_LANGUAGE: en
volumes:
- error-pages-data:/data
ports:
- "8080:8080"
volumes:
error-pages-data:

The /data volume holds the maintenance flag file. With read_only: true it is required if you use maintenance mode, because maintenance on writes a temporary file there; without the volume, switching fails with an error. On a writable container the switch still works without a volume, but it is lost when the container is recreated. See Configuration.

You normally do not publish the port. Put the container on the same Docker network as your reverse proxy and let the proxy ask it for pages. The Traefik page shows the labels.

The image includes a health check that probes /healthz on the local listener. You can run it yourself:

Terminal window
docker exec error-pages /error-pages healthcheck

GET /healthz answers 200 ok as plain text and never shows a page.

  • Runs as user 65532, with a read-only root filesystem if you wish. For maintenance mode, /data must then be a mounted volume, because maintenance on writes a temporary file there.
  • Platforms: linux/amd64 and linux/arm64.
  • Print the version with docker run --rm noixdev/error-pages version.