View Issue Details

IDProjectCategoryView StatusLast Update
0007489CentOS-7httpdpublic2014-08-11 14:08
Reportermarkfletcher Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version7.0-1406 
Summary0007489: httpd-2.4.6-18.el7.centos.x86_64 fails to install in a docker container
DescriptionThe installation of httpd-2.4.6-18.el7.centos.x86_64 inside a docker centos 7 container fails with the following error:-

Error unpacking rpm package httpd-2.4.6-18.el7.centos.x86_64
error: unpacking of archive failed on file /usr/sbin/suexec: cpio: cap_set_file
error: httpd-2.4.6-18.el7.centos.x86_64: install failed

Steps To ReproduceCreate a docker file with the following contents:-

FROM centos:centos7
RUN yum install -y httpd

then try to build image with:-

docker build .

It will fail with the above error
TagsNo tags attached.
abrt_hash
URL

Activities

Evolution

Evolution

2014-08-11 14:08

reporter   ~0020657

This issue is outside the control of the docker image, and more to do with how docker itself is running the container. Docker running on fedora or CentOS will run just fine with the instructions you've listed (see output below). The issue comes in docker not allowing the cap_set_file permission without being run as a privileged container. See for example -> https://github.com/docker/docker/issues/5928

or https://bugzilla.redhat.com/show_bug.cgi?id=1012952



What are you using to run the docker images?

On my CentOS 7 system, this works just fine.

[jperrin@monster docker]$ cat Dockerfile
FROM centos:centos7
RUN yum -y install httpd
[jperrin@monster docker]$ docker build --rm -t jperrin/httpd .
Uploading context 2.56 kB
Uploading context
Step 0 : FROM centos:centos7
 ---> b157b77b1a65
Step 1 : RUN yum -y install httpd
 ---> Running in c53a08395396
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: yum.tamu.edu
 * extras: mirrors.centarra.com
 * updates: centos.arvixe.com
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-18.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-18.el7.centos for package: httpd-2.4.6-18.el7.centos.x86_64
--> Processing Dependency: system-logos >= 7.92.1-1 for package: httpd-2.4.6-18.el7.centos.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-18.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-18.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-18.el7.centos.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package centos-logos.noarch 0:70.0.6-1.el7.centos will be installed
---> Package httpd-tools.x86_64 0:2.4.6-18.el7.centos will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package Arch Version Repository Size
================================================================================
Installing:
 httpd x86_64 2.4.6-18.el7.centos updates 2.7 M
Installing for dependencies:
 apr x86_64 1.4.8-3.el7 base 103 k
 apr-util x86_64 1.5.2-6.el7 base 92 k
 centos-logos noarch 70.0.6-1.el7.centos base 21 M
 httpd-tools x86_64 2.4.6-18.el7.centos updates 77 k
 mailcap noarch 2.1.41-2.el7 base 31 k

Transaction Summary
================================================================================
Install 1 Package (+5 Dependent packages)

Total download size: 24 M
Installed size: 32 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/apr-1.4.8-3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for apr-1.4.8-3.el7.x86_64.rpm is not installed
Public key for httpd-tools-2.4.6-18.el7.centos.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total 5.8 MB/s | 24 MB 00:04
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package : centos-release-7-0.1406.el7.centos.2.4.x86_64 (@Updates/$releasever)
 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : apr-1.4.8-3.el7.x86_64 1/6
  Installing : apr-util-1.5.2-6.el7.x86_64 2/6
  Installing : httpd-tools-2.4.6-18.el7.centos.x86_64 3/6
  Installing : centos-logos-70.0.6-1.el7.centos.noarch 4/6
  Installing : mailcap-2.1.41-2.el7.noarch 5/6
  Installing : httpd-2.4.6-18.el7.centos.x86_64 6/6
  Verifying : apr-1.4.8-3.el7.x86_64 1/6
  Verifying : mailcap-2.1.41-2.el7.noarch 2/6
  Verifying : apr-util-1.5.2-6.el7.x86_64 3/6
  Verifying : httpd-tools-2.4.6-18.el7.centos.x86_64 4/6
  Verifying : centos-logos-70.0.6-1.el7.centos.noarch 5/6
  Verifying : httpd-2.4.6-18.el7.centos.x86_64 6/6

Installed:
  httpd.x86_64 0:2.4.6-18.el7.centos

Dependency Installed:
  apr.x86_64 0:1.4.8-3.el7
  apr-util.x86_64 0:1.5.2-6.el7
  centos-logos.noarch 0:70.0.6-1.el7.centos
  httpd-tools.x86_64 0:2.4.6-18.el7.centos
  mailcap.noarch 0:2.1.41-2.el7

Complete!
 ---> db8b70b8ffde
Removing intermediate container c53a08395396
Successfully built db8b70b8ffde

Issue History

Date Modified Username Field Change
2014-08-11 08:32 markfletcher New Issue
2014-08-11 14:08 Evolution Note Added: 0020657