Yum update fails for Centos 7 container

I’m not sure if this is the right place to look for help on this but it seems that something has changed in the Cento 7 repository that causes a yum update to fail on the latest Centos 7 docker image with the following error:

Transaction check error:
file /usr/lib64/libsystemd-daemon.so.0 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/libsystemd-id128.so.0 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/libsystemd-journal.so.0 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/libsystemd-login.so.0 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/libudev.so.1 from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64
file /usr/lib64/security/pam_systemd.so from install of systemd-libs-219-19.el7.x86_64 conflicts with file from package systemd-container-libs-208.20-6.el7.centos.x86_64

I know that the Centos image has a fake version of systemd and I’ve found that I can work around the problem using the information found here: https://hub.docker.com/_/centos/ but i’m wondering if there is a better way around this. I have no need for systemd at all and doing the swap has the effect of bloating my image by about 400M

I’ve been noticing this all day, and so I took a look at http://dev.centos.org/centos/7/systemd-container/ just now. I see a new package! I ran yum install systemd-container-EOL, and it’s fixed my problems so far… I don’t know what timezone that timestamp is in, or if we are SUPPOSED to magically know to install that, but when I do something akin yum update BOTH that EOL package and the real systemd and systemd-libs try to install… But manually installing systemd-container-EOL first made all my problems away.

Before yum install systemd-container-EOL, docker run centos:7 yum update resulted in trying to installed systemd-container-EOL, systemd, AND systemd-libs. After, none of them.

I just want to say I don’t REALLY think this is the right place to post either, but I couldn’t find this ANYWHERE else! (except https://bugs.launchpad.net/fuel/+bug/1526005 did), I’m sure it’s on some centos thing somewhere… So thanks @kasisto for posting here at least! Hope this helps you too.

Why can’t docker, centos7, and systemd get along? Or if not get along, how about a cage match where only one is allowed to survive?

Just hit these errors when installing an rpm that previously installed on centos:centos7.

What seems to fix it is to “yum update -y” before installing your rpm.

$ docker pull centos:centos7
$ docker run -ti centos:centos7 bash
[root@0d4e45ce40ee /]# yum update -y

[root@0d4e45ce40ee /]# curl -fLO https://example.com/downloads/foo.rpm
[root@0d4e45ce40ee /]# yum install -y ./foo.rpm

Installing : 1:java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64 32/33
Redirecting to /bin/systemctl status foo.service
Failed to get D-Bus connection: Operation not permitted
[root@0d4e45ce40ee /]# service foo start
Failed to get D-Bus connection: Operation not permitted

I guess the “D-Bus connection” errors can be ignored, something systemd related.

https github.com/CentOS/sig-cloud-instance-images/issues/36

Pulling the latest centos image resolves the issue. Here be a post from centos about it.