# WordPress Docker Image Custom WordPress Docker image with Redis and APCu extensions for object caching. ## Features - Based on official `wordpress:php8.4` image - Redis extension for external object caching - APCu extension for in-memory caching - WP-CLI pre-installed for command-line WordPress management ## Usage ### Pull from Registry ```bash docker pull your-registry.com/wordpress:latest ``` ### Build Locally ```bash docker build -t wordpress-custom . ``` ### Run ```bash docker run -d \ -p 8080:80 \ -e WORDPRESS_DB_HOST=db \ -e WORDPRESS_DB_USER=wordpress \ -e WORDPRESS_DB_PASSWORD=secret \ -e WORDPRESS_DB_NAME=wordpress \ wordpress-custom ``` ### Docker Compose Example ```yaml services: wordpress: build: . ports: - "8080:80" environment: WORDPRESS_DB_HOST: db WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: secret WORDPRESS_DB_NAME: wordpress depends_on: - db - redis db: image: mariadb:11 environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: secret redis: image: redis:7-alpine ``` ## Build Arguments | Argument | Default | Description | | ------------- | ------- | ------------------ | | `PHP_VERSION` | `8.4` | PHP version to use | ```bash docker build --build-arg PHP_VERSION=8.3 -t wordpress-custom . ``` ## CI/CD This repository includes a Gitea Actions workflow that automatically builds and pushes the image. ### Required Secrets | Secret | Description | | ------------------- | --------------------------------- | | `REGISTRY_USERNAME` | Container registry username | | `REGISTRY_PASSWORD` | Container registry password/token | ### Optional Variables | Variable | Default | Description | | ------------ | ------------------- | ---------------------- | | `REGISTRY` | `gitea.example.com` | Container registry URL | | `IMAGE_NAME` | Repository name | Custom image name | ### Trigger Events - Push to `main` or `master` branch - Version tags (`v*`) - Pull requests (build only, no push)