我的 Docker 容器不断重新启动,并出现以下错误:
Operation not supported: AH00023: Couldn't create the mpm-accept mutex (95)Operation not supported: could not create accept mutex
我在网上尝试了一些解决方案,包括
platform: linux/amd64
切换docker重启等...
这个解决方案对我不起作用。
但是我无法编辑
httpd.conf
文件,解决方案提供了这里,因为我无法访问docker映像来执行此操作,因为它不断重新启动。
现在有人如何克服这个错误吗?我使用的是 Mac
M1
。
Dockerfile:
FROM 242425.a.a.eu-central-1.amazonaws.com/app-php:7.4
ARG COMPOSER_TOKEN
ENV COMPOSER_TOKEN=${COMPOSER_TOKEN}
ARG GITHUB_OAUTH_TOKEN
ENV GITHUB_OAUTH_TOKEN=${GITHUB_OAUTH_TOKEN}
ARG ENVIRONMENT=""
ENV ENVIRONMENT=${ENVIRONMENT}
RUN apt-get --yes update && apt-get --yes --no-install-recommends install supervisor
RUN if [ "${ENVIRONMENT}" = "local" ]; \
then pecl install xdebug && docker-php-ext-enable xdebug; \
fi
RUN mkdir /root/.composer
RUN if [ "${ENVIRONMENT}" != "local" ]; \
then echo "${COMPOSER_TOKEN}" > /root/.composer/auth.json; \
fi
# Configure Apache
COPY ./config/aws/apache2/breitling.conf /etc/apache2/sites-enabled
# Move application in the correct folder
COPY . /var/www/html/
COPY ./config/aws/secrets_manager/${ENVIRONMENT}/map.csv /usr/local/etc/secrets-map.csv
COPY ./config/aws/supervisor/messenger-worker.conf /etc/supervisor/conf.d
# Fix permissions
RUN setfacl -dR \
-m u:"www-data":rwX \
-m g:"www-data":rwX \
-m u:$(whoami):rwX \
-m o::rwX \
/var/www/html/var
RUN setfacl -R \
-m u:"www-data":rwX \
-m g:"www-data":rwX \
-m u:$(whoami):rwX \
-m o::rwX \
/var/www/html/var
RUN rm -rf \
/var/www/html/var/cache/prod \
/var/www/html/var/cache/test \
/var/www/html/var/cache/dev \
> /dev/null 2>&1
RUN mkdir -p \
/var/www/html/var/cache/prod \
/var/www/html/var/cache/test \
/var/www/html/var/cache/dev \
> /dev/null 2>&1
# Build application
RUN if [ "${ENVIRONMENT}" != "local" ]; \
then /var/www/html/bin/app_build.sh; \
fi
# BAWS-392
RUN if [ "${ENVIRONMENT}" != "local" ]; then rm -rf /root/.composer/cache; fi
RUN if [ "${ENVIRONMENT}" != "local" ]; then find /var/www/html/vendor -type d -name .git -delete; fi
ENTRYPOINT /var/www/html/bin/entrypoint.aws.sh
感谢@Bets,通过将以下内容添加到 Dockerfile 中解决了问题:
RUN echo "Mutex posixsem" >> /etc/apache2/apache2.conf
我遇到了同样的错误 - AH00023:无法创建 mpm-accept 互斥体,我在上面尝试过,但这不起作用,您能帮忙吗? [Wed Apr 03 12:15:59.525161 2024] [core:emerg] [pid 14:tid 140405366513408] (2)没有这样的文件或目录:AH00023:无法创建 mpm-accept 互斥体(文件 /proj/projname/站点/日志/mpm-accept-0.14) (2)没有这样的文件或目录:无法创建接受互斥体 AH00015:无法打开日志
在 docker 文件 -