Error with yum update in docker CentOS 7

docker

#1

The following command starting failing yesterday (2016-12-12):

docker run -t centos:centos7 yum -y update

It seems to be related to a new CentOS 7 update [1]. Previous runs of yum -y update from recent history did not update any packages.

The key errors are:

Updating   : filesystem-3.2-21.el7.x86_64
Error unpacking rpm package filesystem-3.2-21.el7.x86_64
error: unpacking of archive failed on file /proc: cpio: chown
error: filesystem-3.2-21.el7.x86_64: install failed

and:

Updating   : iputils-20160308-8.el7.x86_64
Error unpacking rpm package iputils-20160308-8.el7.x86_64
error: unpacking of archive failed on file /usr/bin/ping: cpio: cap_set_file
error: iputils-20160308-8.el7.x86_64: install failed
```

The rest of the build is available at [2].

Following the advice of others [3, 4], I tried:

```
docker run -t centos:centos7 /bin/bash -c 'echo "%_netsharedpath /sys:/proc" >> /etc/rpm/macros.dist; yum -y update'
```

That fixed the `filesystem` package update; however, the `iputils` package still fails. See [5].

Any thoughts on what the problem is and how to fix it or work around it?

_P.S. I'm putting the links down here since I'm apparently not allowed more than 2 as a new user to the forum._

[1] lists.centos.org/pipermail/centos-announce/2016-December/022172.html
[2] circleci.com/gh/rheosystems/circleci-docker-centos-test/1
[3] old.kkoncepts.net/blog/upgrading-filesystem-rpm-redhatcentos-vserver-guest
[4] bugzilla.redhat.com/show_bug.cgi?id=210945#c8
[5] circleci.com/gh/rheosystems/circleci-docker-centos-test/2

#2

I just ran docker run -t centos:centos7 yum -y update with a fresh install of docker-1.12.4 on a https://dply.co/ server with no problems.


#3

Same error here. It fails when launching the following build of a Centos7-based container image:

    - docker build --rm=false -t bbvainnotech/kvm .

In the Dockerfile:

RUN yum clean all \
    && yum update -y \
    && yum install -y qemu-kvm bridge-utils iproute dnsmasq \
    && yum clean all

Building it in both my machine from scratch and in dockerHub succeeds, so it seems that it’s something related with the VM CircleCI uses for building the container image, right?.

It would be nice that someone from CircleCI confirm that it’s indeed a bug on the system, of it could be related with anything else.


#4

I’m getting the same issue, but with an amazonlinux:2016.09 container, which is a derivative of redhat 7:

 xz.x86_64 0:5.1.2-12alpha.12.amzn1                                            
   
   Failed:
 iputils.x86_64 0:20121221-7.13.amzn1                                          
   
   Complete!
   The command '/bin/sh -c yum install -y   aws-cli   bind-utils   ec2-utils   htop   java-1.7.0-openjdk    kernel kernel-tools   less logrotate lsof lvm2   mailcap   nano nc newt-python27 nfs-utils ntp ntpdate   openssh-clients openssh-server   passwd pcre perl procmail   rsyslog   screen sendmail sudo   time traceroute    unzip   vim-enhanced   wget words   yum-utils   zip' returned a non-zero code: 1
-----> Destroying <default-amazonlinux-201609>...

#5

We’re having the same issue - has anyone from CircleCI responded with a workaround? This seems like a pretty major issue to have no official response from.


#6

I wound up moving to their v2.0 platform and rolling my own custom images.


#7

Switching to 2.0 helped. Looks like they use updated Ubuntu 14.04 image.


#8

Has anybody been able to work around this on circleci 2.0 without rolling a custom docker image? I’d like to avoid that if at all possible


#9