Apache在alpine docker镜像中无法启动。以下是我的docker文件
FROM alpine:latest
RUN apk update
RUN apk upgrade
RUN apk add bash
RUN apk add apache2
RUN apk add openrc
RUN rc-update add apache2
EXPOSE 80 443
WORKDIR /var/www/localhost/htdocs
COPY index.html /var/www/localhost/htdocs
我尝试在登录到正在运行的docker后手动启动Apache,但不起作用
错误信息为:
* You are attempting to run an openrc service on a
* system which openrc did not boot.
* You may be inside a chroot or you may have used
* another initialization system to boot this system.
* In this situation, you will get unpredictable results!
* If you really want to do this, issue the following command:
* touch /run/openrc/softlevel
* ERROR: networking failed to start
* ERROR: cannot start apache2 as networking would not start
httpd:2.4.37-alpine
。 - sandy