gpt4 book ai didi

docker archlinux镜像: System has not been booted with systemd as init system (PID 1).无法操作

转载 作者:行者123 更新时间:2023-12-02 18:00:13 34 4
gpt4 key购买 nike

我正在使用来自docker hub的archlinux/base官方镜像。

我正在尝试使用systemctl,它说。

$ docker run --rm -it ac16c4b756ed systemctl start httpd     
System has not been booted with systemd as init system (PID 1). Can't operate.

如何解决这个问题。

最佳答案

如果您的目标是运行Apache Web服务器(httpd),则应使用httpd image

Docker容器通常旨在运行单个进程。因此,您通常不会设计一个容器来将诸如systemd之类的内容作为根进程运行,然后将httpd作为子进程运行。您只需直接在前台运行httpd。 httpd镜像执行此操作。

关于docker archlinux镜像: System has not been booted with systemd as init system (PID 1).无法操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54976063/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com