skip to Main Content

I have a docker-compose.yml file:

version: '1'
services:
  mariadb:
    image: 'docker.io/bitnami/mariadb:10.3-debian-10'
    ports:
      - '3307:3306'
    volumes:
      - ./db:/bitnami/mariadb
    environment:
      - MARIADB_USER=bn_wordpress
      - MARIADB_DATABASE=bitnami_wordpress
      - ALLOW_EMPTY_PASSWORD=yes
  wordpress:
    image: 'docker.io/bitnami/wordpress:5-debian-10'
    ports:
      - '8081:8080'
      - '8444:8443'
    volumes:
      - ./wp:/bitnami/wordpress
    depends_on:
      - mariadb
    environment:
      - MARIADB_HOST=mariadb
      - MARIADB_PORT_NUMBER=3306
      - WORDPRESS_DATABASE_USER=bn_wordpress
      - WORDPRESS_DATABASE_NAME=bitnami_wordpress
      - ALLOW_EMPTY_PASSWORD=yes

In Mac (Intel) and Linux, I run docker-compose up and it works perfectly.
But in Macbook M1, I installed Docker for Apple Silicon chip and updated rosetta, it prompts this at the end:

wordpress_1  | wordpress 15:48:36.49 INFO  ==> ** Starting Apache **
wordpress_1  | [Tue Jul 13 15:48:36.652803 2021] [core:emerg] [pid 1] (95)Operation not supported: AH00023: Couldn't create the mpm-accept mutex 
wordpress_1  | (95)Operation not supported: could not create accept mutex
wordpress_1  | AH00015: Unable to open logs

How can I overcome the issue? Appreciate your help!

4

Answers


  1. A bit late but have you tried adding platform: linux/amd64? Under both mariadb and wordpress

    Login or Signup to reply.
  2. Running docker compose with platform: linux/amd64 (i.e. running under QEMU) didn’t fix this problem for me. Instead (in addition), I had to add:

    Mutex posixsem
    

    … to httpd.conf.

    Login or Signup to reply.
  3. Let me share a summary for quick solution.

    Connect to the container as the root user

    docker exec -it -u 0 <container_name> /bin/bash
    

    update httpd.conf file

    echo "Mutex posixsem" >> /opt/bitnami/apache2/conf/httpd.conf
    

    restart the container

    docker restart <container_name>
    
    Login or Signup to reply.
  4. For devices with m1 processor, you can use platform: linux/arm64 in docker-compose.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search