If you want to customize a Wordpress container, for example - to add PHP modules needed by plugins and themes - just create a new Dockerfile
such as this:
FROM wordpress:php8.2-apache
RUN apt-get update; apt-get install -y --no-install-recommends libxml2-dev libonig-dev
RUN docker-php-ext-install soap mbstring pdo pdo_mysql
(a lot of PHP extensions also require development library dependencies that are missing from the official container)
And you can use it in a compose file like so:
wordpress:
build:
context: path/to/new/Dockerfile
(it is recommended to put the Wordpress extension Dockerfile in its own sub-directory so that you can add files locally without making too much of a mess).
Maintained by: Oded Arbel
This is a fork of the Git repo of the Docker "Official Image" for wordpress
. See the Docker Hub page for the full readme on how to use this Docker image and for information regarding contributing and issues.
This fork was created to enable Wordpress Multi-site functionality out of the box without needing any additional site-specific configuration.
The full image description on Docker Hub is generated/maintained over in the docker-library/docs repository, specifically in the wordpress
directory.
For more information about the full official images change lifecycle, see the "An image's source changed in Git, now what?" FAQ entry.
For outstanding wordpress
image PRs, check PRs with the "library/wordpress" label on the official-images repository. For the current "source of truth" for wordpress
, see the library/wordpress
file in the official-images repository.
Build | Status | Badges | (per-arch) |
---|---|---|---|