Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trafex/docker-wordpress
WordPress container with Nginx 1.26 & PHP-FPM 8.3 based on Alpine Linux
https://github.com/trafex/docker-wordpress
alpine alpine-linux container containers docker docker-compose docker-wordpress nginx php php8 php8-docker php8-fpm wordpress wordpress-container wp-cli
Last synced: 2 days ago
JSON representation
WordPress container with Nginx 1.26 & PHP-FPM 8.3 based on Alpine Linux
- Host: GitHub
- URL: https://github.com/trafex/docker-wordpress
- Owner: TrafeX
- License: mit
- Created: 2016-08-14T13:46:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-05T12:24:51.000Z (16 days ago)
- Last Synced: 2025-01-19T03:57:09.055Z (2 days ago)
- Topics: alpine, alpine-linux, container, containers, docker, docker-compose, docker-wordpress, nginx, php, php8, php8-docker, php8-fpm, wordpress, wordpress-container, wp-cli
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/trafex/wordpress/
- Size: 149 KB
- Stars: 268
- Watchers: 16
- Forks: 142
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# WordPress Docker Container
Lightweight WordPress container with Nginx 1.26 & PHP-FPM 8.4 based on Alpine Linux.
_WordPress version currently installed:_ **6.7.1**
* Used in production for many sites, making it stable, tested and up-to-date
* Optimized for 100 concurrent users
* Optimized to only use resources when there's traffic (by using PHP-FPM's ondemand PM)
* Works with Amazon Cloudfront or CloudFlare as SSL terminator and CDN
* Multi-platform, supporting AMD4, ARMv6, ARMv7, ARM64
* Built on the lightweight Alpine Linux distribution
* Small Docker image size (+/-90MB)
* Uses PHP 8.4 for the best performance, low cpu usage & memory footprint
* Can safely be updated without losing data
* Fully configurable because wp-config.php uses the environment variables you can pass as an argument to the container[![Docker Pulls](https://img.shields.io/docker/pulls/trafex/wordpress.svg)](https://hub.docker.com/r/trafex/wordpress/)
![nginx 1.26](https://img.shields.io/badge/nginx-1.26-brightgreen.svg)
![php 8.4](https://img.shields.io/badge/php-8.4-brightgreen.svg)
![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)## [![Trafex Consultancy](https://timdepater.com/logo/mini-logo.png)](https://timdepater.com?mtm_campaign=github)
I can help you with [Containerization, Kubernetes, Monitoring, Infrastructure as Code and other DevOps challenges](https://timdepater.com/?mtm_campaign=github).## Usage
See [docker-compose.yml](https://github.com/TrafeX/docker-wordpress/blob/master/docker-compose.yml) how to use it in your own environment.docker-compose up
Or
docker run -d -p 80:80 -v /local/folder:/var/www/wp-content \
-e "DB_HOST=db" \
-e "DB_NAME=wordpress" \
-e "DB_USER=wp" \
-e "DB_PASSWORD=secret" \
-e "FS_METHOD=direct" \
trafex/wordpress### WP-CLI
This image includes [wp-cli](https://wp-cli.org/) which can be used like this:
docker exec /usr/local/bin/wp --path=/usr/src/wordpress
## Inspired by
* https://hub.docker.com/_/wordpress/
* https://codeable.io/wordpress-developers-intro-to-docker-part-two/
* https://github.com/TrafeX/docker-php-nginx/
* https://github.com/etopian/alpine-php-wordpress