Project

General

Profile

Actions

Bug #10755

closed

src/test/centos/Dockerfile.in is unfit for centos6

Added by Loïc Dachary about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

100%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

  • systemd must not be restored
  • EPEL 6 must be installed instead of 7
  • yum install which
  • replace in the usage "centos6" and "centos7" with "6" and "7"
Actions #1

Updated by Loïc Dachary about 9 years ago

  • Description updated (diff)
Actions #2

Updated by Loïc Dachary about 9 years ago

centos/Dockerfile.in should be

    FROM centos:%%os_version%%
    COPY install-deps.sh ceph.spec.in /root/
    # http://jperrin.github.io/centos/2014/09/25/centos-docker-and-systemd/
    #RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs && (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done) && rm -f /lib/systemd/system/multi-user.target.wants/* && rm -f /etc/systemd/system/*.wants/* && rm -f /lib/systemd/system/local-fs.target.wants/* && rm -f /lib/systemd/system/sockets.target.wants/*udev* && rm -f /lib/systemd/system/sockets.target.wants/*initctl* && rm -f /lib/systemd/system/basic.target.wants/* && rm -f /lib/systemd/system/anaconda.target.wants/* && yum install -y redhat-lsb-core
    RUN yum install -y yum-utils && yum-config-manager --add-repo https://dl.fedoraproject.org/pub/epel/6/x86_64/ && yum install --nogpgcheck -y epel-release && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 && rm /etc/yum.repos.d/dl.fedoraproject.org*
    # build dependencies
    RUN yum install -y which ; cd /root ; ./install-deps.sh
    # development tools
    # nc is required to run make check on firefly only (giant+ do not use nc)
    RUN yum install -y ccache valgrind gdb git python-virtualenv gdisk kpartx hdparm jq sudo xmlstarlet parted nc
    RUN useradd -M --uid %%user_id%% %%USER%% && echo '%%USER%% ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers


that works with centos:6. It won't work with centos:7 and they should have two separate dockerfiles. Factorizing os_types dockerfiles probably was not a good idea and it would be simpler to have one dockerfile per os type.

Actions #3

Updated by Loïc Dachary about 9 years ago

  • Description updated (diff)
Actions #4

Updated by Loïc Dachary about 9 years ago

  • Status changed from 12 to Fix Under Review
  • % Done changed from 0 to 80
Actions #5

Updated by Loïc Dachary about 9 years ago

  • Status changed from Fix Under Review to Resolved
  • % Done changed from 80 to 100
Actions

Also available in: Atom PDF