Wordpress docker container - help enabling automatic plugin and theme updates

I’ve successfully installed Wordpress using Docker. Almost everything works, including manual updates of plugins and themes in the Wordpress admin console, which shows that file permissions are correct. What I’m having trouble with is getting automatic plugin and theme updates to work. Automatic plugin and theme updates work on my non-docker hosted Wordpress instances.

Wordpress core updates are easy, I just update the container image and the core files are replaced - they’re never written to a local file system, they stay in the container.

I’ve spent many hours searching the internet, reading Stack Exchange, reading what I can find. I’ve tried calling the wordpress cron PHP script manually. I’m about out of ideas to get this to work properly, I’d appreciate some help :slight_smile:

This screenshot shows there are updates available, and that manual updates from the Wordpress console works.

Here’s my docker compose file.

services:
  wordpress:
    container_name: wordpress
    image: wordpress:php8.3-apache
    restart: unless-stopped
    environment:
      TZ: Pacific/Auckland
      WORDPRESS_DB_HOST: (removed)
      WORDPRESS_DB_NAME: (removed)
      WORDPRESS_DB_USER: (removed)
      WORDPRESS_DB_PASSWORD: (removed)
    ports:
      # Make available to reverse proxy
      - '8081:80'
    volumes:
      # Map wordpress content folder, but use Wordpress from the conatiner
      - /var/www/wordpress/wp-content/:/var/www/html/wp-content/
      # Apache2 configuration
      - /docker/wordpress/conf/apache/mpm_prefork.conf:/etc/apache2/mods-available/mpm_prefork.conf
      # PHP configuration
      - /docker/wordpress/conf/php/php.ini-production:/usr/local/etc/php/php.ini
      # Allow apache logs to be written to the host file system
      - /var/log/apache2/:/var/log/apache2/
      # Allow php logs to be written to the host file system
      - /var/log/php/:/var/log/php/
      # Allow uploads
      - /docker/wordpress/conf/php/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini