Docker as a builder, can't install systemd header files

流过昼夜 提交于 2019-12-06 01:57:12

fakesystemd is a special package in the CentOS Docker image that satisfies the dependency to Systemd without actually installing Systemd (after all, you don't usually need an init system within a container). yum info fakesystemd tells a bit more:

Minimal docker-specific package to satisfy systemd Provides: without installing systemd in Docker images. It is intended strictly for use in Docker images/containers. It doesn't provide any functionality from systemd package - it only contains few important directories and files. fakesystemd is definitely not applicable for full bootable operation system!

To install the real systemd in the image you need to run yum swap command in this form:

yum swap -- remove fakesystemd -- install systemd systemd-libs

You need to swap the fakesystemd package with the "real" systemd package, and can then also install systemd-devel:

RUN yum swap -y fakesystemd systemd && \
    yum install -y systemd-devel
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!