A great base image for WordPress sites.
The base image is available on Docker Hub.
We provide multiple tags for images, below are some common examples:
# To use a specific semantic version
FROM evermadefi/dockerpress-base-image:3.0.23
FROM evermadefi/dockerpress-base-image:3.0
FROM evermadefi/dockerpress-base-image:3
# You can specify the Debian and PHP versions as well
FROM evermadefi/dockerpress-base-image:3.0.23-php8.3-debian13
FROM evermadefi/dockerpress-base-image:3.0.23-php8.3
FROM evermadefi/dockerpress-base-image:3.0.23-debian13
# To use a specific tag or branch
FROM evermadefi/dockerpress-base-image:v3.0.23
FROM evermadefi/dockerpress-base-image:master
# To use a specific commit hash
FROM evermadefi/dockerpress-base-image:deadbeefdeadbeefdeadbeefdeadbeefdeadbeefTo simply just pull the image or update a stale local copy, run the docker pull command like so with the tag you wish you pull:
docker pull evermadefi/dockerpress-base-image:3.0.23
And enjoy!
-
Commit any necessary changes to the Dockerfile template on your branch (see Templates)
-
Create a pull request to the appropriate branch (such as master) from your branch
-
Make sure your pull request passes the automatic build workflow and fix appropriately if needed
-
Request a pull request review
-
Have the pull request approved and merged to master
-
Once merged to master, a new build process will be automatically dispatched and once complete, the new image will be pushed to Docker Hub with the full commit hash and branch name as tags. The build process also automatically applies Open Containers labels to the images.
-
Draft a new release on GitHub using the MAJOR.MINOR.PATCH semantic versioning scheme for the new tag with the "v" prefix (e.g. v3.0.99). You can also create and push a tag separately using your preferred Git client, but GitHub allows you to do this all at once, so it is not necessary.
-
Write a description with the changelog for the release.
-
Publish the new release
-
This automatically triggers the image builder GitHub Workflow and will eventually, after some 30 minutes, push the new images with the appropriate tags and labels to Docker Hub. So, go get a cup of ☕️ while you wait.
-
Once the build is complete, you can pull the new image as shown in the Usage section. Sometimes a build may fail due to rate limiting. You should trigger a rebuild for a failed build manually. You don't need to rebuild everything, just the failed builds.
The latest release is also rebuilt without cache every weekday by the Rebuild latest release workflow to pick up base image and apt package updates.
The Dockerfiles and GitHub Actions workflows are templated with Nunjucks (.njk files).
If you want to edit a Dockerfile or workflow please edit the corresponding template file and then run pnpm install (first time only) and node generate-files.js to generate the final files. Do not edit any generated files directly.
-
Check the integrity of the source yourself, that the contents are correct.
-
Add an
ADDinstruction with the checksum and appropriate owner and permissions. -
If available, verify the file signatures with a known good GPG key.
If the build is throwing a checksum mismatch error, the file contents must have changed and must be re-verified.
If the signature cannot be verified, the file is not signed by a known good GPG key. If the GPG key used to sign the file looks valid, you should add it to the GPG key list.
Python is currently used by certbot (certbot-requirements.in) and supervisor (supervisor-requirements.in).
-
Additional dependencies may be added to the *-requirements.in file if required.
-
Run the Docker command commented in *-requirements.in to generate the *-requirements.txt file.
-
Verify that the *-requirements.txt is legit.
The following dependencies should be checked every so often for updates.
- https://github.com/actions/checkout
- https://github.com/actions/upload-artifact
- https://github.com/actions/download-artifact
- https://github.com/docker/metadata-action
- https://github.com/docker/login-action
- https://github.com/docker/setup-buildx-action
- https://github.com/docker/build-push-action
- Runner images (in generate-files.js): https://github.com/actions/runner-images
- Dockerfile syntax: https://github.com/moby/buildkit
- Base image (pinned by digest in generate-files.js)
- Official PHP Docker base image: https://hub.docker.com/_/php
- Official WordPress Docker base image (for reference): https://github.com/docker-library/wordpress
- CA certificates: https://curl.se/docs/caextract.html
- Cosign: https://github.com/sigstore/cosign
- Sigstore trusted root: https://github.com/sigstore/root-signing
- tuf-client: https://github.com/theupdateframework/go-tuf (legacy v0.x is deprecated, migrate to v2)
- Go: https://go.dev/dl/
- Python: https://www.python.org/downloads/source/
- WP-CLI: https://github.com/wp-cli/wp-cli
- Core Rule Set: https://github.com/coreruleset/coreruleset
- ModSecurity: https://github.com/owasp-modsecurity/ModSecurity
- PIE: https://github.com/php/pie
- PHP extensions installed via PIE: https://packagist.org/extensions
- cachetool: https://github.com/gordalina/cachetool
- Nginx
- Nginx modules
- ngx_brotli: https://github.com/google/ngx_brotli
- libnginx-mod-http-cache-purge: https://salsa.debian.org/nginx-team/libnginx-mod-http-cache-purge
- libnginx-mod-http-geoip2: https://salsa.debian.org/nginx-team/libnginx-mod-http-geoip2
- headers-more-nginx-module: https://github.com/openresty/headers-more-nginx-module
- ModSecurity-nginx: https://github.com/owasp-modsecurity/ModSecurity-nginx
- Signing keys (rarely change, the build fails on a checksum mismatch when they do)
- nginx: https://nginx.org/en/linux_packages.html#signatures
- Go: https://go.dev/dl/
- WP-CLI: https://github.com/wp-cli/builds
- Core Rule Set: https://coreruleset.org/security.asc
- Python dependencies
- Debian runtime library package names (e.g.
libicu76,libzip5) when adding a new Debian version
- Node.js (.nvmrc): https://nodejs.org/en/about/previous-releases
- pnpm (
devEnginesin package.json): https://github.com/pnpm/pnpm - Nunjucks (package.json): https://github.com/mozilla/nunjucks