Minimal, Docker images for Wordpress. This image not include with web server and need seperate web server container.
Multi-platform available trough docker manifest. Simply pulling using latest tag should retrieve the correct image for your arch.
The architectures supported by this image:
| Architecture | Available |
|---|---|
| x86-64 | ✅ |
| arm64 | ✅ |
Here are some example to help you get started creating a container, easiest way to setup is using docker-compose or use docker cli.
---
version: "3.9"
services:
wordpress:
image: imoize/wordpress:latest
container_name: wordpress
ports:
- 9000:9000
environment:
- PUID=1001
- PGID=1001
- TZ=Asia/Jakarta
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_NAME=wordpress
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
volumes:
- /path/to/app/data:/config
restart: always
docker run -d \
--name=wordpress \
-p 9000:9000
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Asia/Jakarta \
-e WORDPRESS_DB_HOST=db \
-e WORDPRESS_DB_NAME=wordpress \
-e WORDPRESS_DB_USER=wordpress \
-e WORDPRESS_DB_PASSWORD=wordpress \
-v /path/to/app/data:/config \
--restart always \
imoize/wordpress:latest
| Name | Description | Default Value |
|---|---|---|
| PUID | User UID | |
| PGID | Group GID | |
| TZ | Specify a timezone see this list. | UTC |
| S6_VERBOSITY | Controls the verbosity of s6-rc. See this. | 1 |
| BYPASS_DB_CHECK | Bypass Database check before service start. | no |
| WORDPRESS_DB_HOST | Define database hostname. Can use docker secret. | |
| WORDPRESS_DB_NAME | Define database name. Can use docker secret. | |
| WORDPRESS_DB_USER | Define database user. Can use docker secret. | |
| WORDPRESS_DB_PASSWORD | Define database password. Can use docker secret. | |
| WORDPRESS_TABLE_PREFIX | Define table prefix, you can change it. Can use docker secret. | wpx_ |
| MEMORY_LIMIT | Set PHP Memory Limit. | 256M |
| MAX_INPUT_TIME | Set PHP Maximum Input Time. | 600 |
| MAX_INPUT_VARS | Set PHP Maximum Input Vars. | 5000 |
| MAX_FILE_UPLOADS | Set PHP Maximum File can be Upload. | 20 |
| MAX_EXECUTION_TIME | Set PHP Maximum Execution Time. | 600 |
| POST_MAX_SIZE | Set PHP Maximum Post Size. | 16M |
| UPLOAD_MAX_FILESIZE | Set PHP Maximum Filesize can be Upload. | 16M |
| OPCACHE_ENABLE | Set PHP Opcache enable or not. | true |
When you start the wordpress image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the docker run command line. Please note that some variables are only considered when the container is started for the first time. If you want to add a new environment variable:
docker-compose add the variable name and value:wordpress:
...
environment:
- PUID=1001
- TZ=Asia/Jakarta
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_NAME=wordpress
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
- BYPASS_DB_CHECK=yes
...
-e option with each variable and value: docker run -d \
-e PUID=1001 \
-e TZ=Asia/Jakarta \
-e WORDPRESS_DB_HOST=db \
-e WORDPRESS_DB_NAME=wordpress \
-e WORDPRESS_DB_USER=wordpress \
-e WORDPRESS_DB_PASSWORD=wordpress \
-e BYPASS_DB_CHECK=yes \
imoize/wordpress:latest
You can append _FILE (double underscore) to WORDPRESS_DB* env.
services:
wordpress:
...
environment:
- PUID=1001
- WORDPRESS_DB_PASSWORD__FILE="/run/secrets/wordpress_password"
secrets:
- wordpress_password
secrets:
wordpress_password:
external: true
...
If you remove the container all your data will be lost, and the next time you run the image the data and config will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.
For persistence you should map directory inside container in /config path to host directory as data volumes. Application state will persist as long as directory on the host are not removed.
e.g: /path/to/app/data:/config
wordpress:
...
environment:
- PUID=1001
volumes:
- /path/to/app/data:/config
...
/config folder contains wordpress relevant configuration files.
For example: PUID=1001 and PGID=1001, to find yours user id and gid type id <your_username> in terminal.
$ id your_username
uid=1001(user) gid=1001(group) groups=1001(group)
We'd love for you to contribute to this container. You can submitting a pull request with your contribution.
If you encountered a problem running this container, you can create an issue.
Content type
Image
Digest
sha256:a414bd269…
Size
100.3 MB
Last updated
almost 2 years ago
docker pull imoize/wordpress