1. Images & Charts
  2. wordpress
wordpress

wordpress

Apps
Updated 14 hours ago

WordPress Overview

Secure your stack with a hardened WordPress image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies.


Try It Out

To take the Minimus WordPress image for a test run, we will use Docker Compose to create a simple self-hosted web-page with MySQL and NGINX as our proxy server.

Next, save the sample nginx.conf file to your project directory. Link to file

Save the following code to a new file compose.yaml in your project directory:

services:
  wordpress:
    image: reg.mini.dev/wordpress
    container_name: wordpress
    ports:
      - "8080:80"  # Expose WordPress on port 8080 of the host
    environment:
      - WORDPRESS_DB_HOST=mysql:3306
      - WORDPRESS_DB_NAME=wordpress
      - WORDPRESS_DB_USER=wordpressuser
      - WORDPRESS_DB_PASSWORD=wordpresspassword
    volumes:
      - wordpress_data:/var/www/html  # Persist data for WordPress
    depends_on:
      - mysql  # Wait for the MySQL container to be ready

  nginx:
    image: reg.mini.dev/nginx
    container_name: nginx
    ports:
      - "80:80"  # Expose nginx on port 80 of the host
    volumes:
      # Mount your custom nginx configuration
      - ./nginx.conf:/etc/nginx/nginx.conf
      # Link to WordPress volume to serve content
      - wordpress_data:/var/www/html  
    depends_on:
      - wordpress # Wait for the WordPress container to be ready

  mysql:
    image: reg.mini.dev/mysql
    container_name: mysql
    environment:
      MYSQL_ROOT_PASSWORD: rootpassword
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpressuser
      MYSQL_PASSWORD: wordpresspassword
    volumes:
      - mysql_data:/var/lib/mysql  # Persist data for MySQL
    ports:
      - "3306:3306"  # Expose MySQL on port 3306 of the host

volumes:
  mysql_data:         # Named volume to persist MySQL data
  wordpress_data: # Named volume to persist WordPress data

As an extra precaution, you can add the WORDPRESS_CONFIG_EXTRA environment variable to block automatic updates and disable the option to install new themes and plugins.

WORDPRESS_CONFIG_EXTRA: |  
  define( 'DISALLOW_FILE_MODS', true ); # Disables plugin and theme installations and updates
  define( 'AUTOMATIC_UPDATER_DISABLED', true );   # Disables automatic background updates

Run the app:

docker compose up

Visit the WordPress default welcome page at http://localhost. (Since NGINX is exposed on port 80, there's no need to specify the port.)

If you're working in a VM, run curl ifconfig.me to look up your external IP and substitute it like this: http://{IP}. You will be automatically redirected to http://{IP}/wp-admin/install.php.

Once ready to clean up, run the following command to remove the containers and their associated volumes:

docker compose down -v

Technical Considerations

The WordPress image provided by Minimus is a slim, security-hardened alternative to the public image from Docker Hub. The images are largely interchangeable, with a few differences as noted below.

About WordPress built by Minimus:

  1. Runs as non-root by default as user 1000.
  2. The entrypoint matches the public image, but the default CMD is different.
  3. Listens by default on port 9000/TCP without exposing it. The public image listens on and exposes port 80/TCP.

The Payoff

A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.


Terms & Info

Trademark

This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.

Disclaimer

Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.