From c3e6994728c09b325992466f6cc21c92f2615322 Mon Sep 17 00:00:00 2001 From: Nate Amundson Date: Thu, 26 Jan 2017 12:47:08 -0800 Subject: [PATCH] Fix yum package conflict in Docker image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running the CLI builds on the new build agents, the CentOS build failed with the following error: 2017-01-26T20:39:30.0800810Z Step 4 : RUN yum -q -y install unzip libunwind gettext libcurl-devel openssl-devel zlib libicu-devel 2017-01-26T20:39:30.3020500Z ---> Running in 97affb106685 2017-01-26T20:39:40.3872390Z Error: libselinux conflicts with fakesystemd-1-17.el7.centos.noarch Swapping the the "fakesystemd" package with the real "systemd" package fixed the issue, which was recommended in http://stackoverflow.com/a/36632668. This issue hasn't been seen on the official builds because the build agents in that pool have the Docker image cached, and they are using an older version of the centos:7.1.1503 image which appears not to have this issue. --- scripts/docker/centos/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/docker/centos/Dockerfile b/scripts/docker/centos/Dockerfile index ae3e87d6a..6bba0fb81 100644 --- a/scripts/docker/centos/Dockerfile +++ b/scripts/docker/centos/Dockerfile @@ -6,6 +6,10 @@ # Dockerfile that creates a container suitable to build dotnet-cli FROM centos:7.1.1503 +# Swap the "fakesystemd" package with the real "systemd" package, because fakesystemd conflicts with openssl-devel. +# The CentOS Docker image uses fakesystemd instead of systemd to reduce disk space. +RUN yum -q -y swap -- remove fakesystemd -- install systemd systemd-libs + RUN yum -q -y install deltarpm RUN yum -q -y install epel-release # RUN yum -y update