'Docker: Apache in Apple Silicon M1
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!
Solution 1:[1]
A bit late but have you tried adding platform: linux/amd64
? Under both mariadb
and wordpress
Solution 2:[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
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Carlos AmorĂ³s |
Solution 2 | PaoloC |