What is docker-cms?
docker-cms is a maintenance and troubleshooting container for PHP-based CMS environments — WordPress, Joomla, Drupal, and similar. It is not meant to run your CMS. It is meant to work on it.
The idea is simple: mount your existing site directories into this container and get immediate access to a full suite of tools — without touching your running production setup. Resize images, run database maintenance, inspect files, push backups, or debug a broken install, all from a clean isolated shell alongside your live stack.
Why Use docker-cms?
Maintenance without risk
- Work on the files, not inside the running container. Mount
/var/wwwfrom your production container and operate on the same files — without exec-ing into a container that has none of the tools you need. - Image resizing and conversion. ImageMagick (
convert,mogrify,identify) and libvips with the php-vips bindings are both available. Bulk-resize an upload directory, strip EXIF metadata, or convert legacy formats without writing a plugin or pulling in a separate tool container. - Database maintenance. The MariaDB client is installed. Connect to your database and run
OPTIMIZE TABLE, check for corruption, export a clean dump, or fix a broken options row — directly from the shell, without stopping anything. - Backup and transfer.
rsync,git,openssh-client,zip, andunzipare all present. Pull a remote backup, push files offsite, clone a repo into a theme directory, or unpack an uploaded archive — no extra containers needed. - WP-CLI for everything WordPress. Run
wp search-replace,wp db export,wp plugin update --all, orwp cron event runagainst the live site files. Thewpalias runs aswww-dataso file ownership stays correct. - Composer for dependency management. Run
composer install,composer update, or dump autoloaders directly in the mounted site directory without installing Composer into your production image.
Troubleshooting
- Interactive editors and file managers.
nanoandmc(Midnight Commander) let you edit config files, browse directory trees, and inspect permissions without a GUI or a remote IDE connection. - jq for JSON inspection. Parse
wp-config.phpexports, inspect REST API responses, or pretty-print plugin metadata files on the spot. - pv for visible progress. Pipe large SQL dumps or archive files through
pvand get real-time throughput and ETA — useful when a slow import leaves you wondering if anything is actually happening. - www-data has a real shell. The
www-datauser is configured with/bin/bash. Switch to it withsu www-dataand reproduce permission or file-ownership problems exactly as the web process sees them. - curl and wget for HTTP diagnosis. Test endpoints, download patches, or verify that your site responds correctly — from inside the same network as your stack.
- Bash aliases pre-configured. Coloured
lsandgrepare set up in/root/.bashrcso log scanning and directory listings are readable the moment you open a shell.
Typical Usage
docker run --rm -it
--volumes-from my-wordpress-container
eilandert/docker-cms:latest bash
Or with explicit mounts:
docker run --rm -it
-v /srv/wordpress:/var/www
-v /srv/db-backups:/backups
eilandert/docker-cms:latest bash
Your production containers keep running. docker-cms just gets access to the same files and network, does its work, and exits.
Source
The Dockerfile is maintained in the eilandert/dockerized repository under src/docker-cms/. The image is published to Docker Hub as eilandert/docker-cms:latest.