Commit 535309f5 authored by Michał Kępień's avatar Michał Kępień

RPM packager: stop forcing use of IPv4 at image build time

YUM for CentOS 6 does not support the "ip_resolve" configuration option,
so the tweaks applied in the Dockerfile are not fully effective.
Furthermore, hardcoded file paths make those tweaks prone to breaking
due to package updates.  It is also simpler to disable IPv6 globally
after creating a Docker container than trying to patch all places where
it can potentially be used at image build time.
parent 22fde085
......@@ -5,8 +5,6 @@ RUN yum -y install epel-release
RUN yum -y install git iproute jq make mock python-pip
RUN pip install cloudsmith-cli
RUN yum -y install python-configparser
RUN sed -i '/^\[main\]$/aip_resolve=4' /etc/yum.conf /etc/mock/epel-{6,7,8}-x86_64.cfg
RUN sed -i 's/\(ip_resolve = CaselessSelectionOption(\)/\1default="ipv4",/' /usr/lib/python2.7/site-packages/yum/config.py
COPY cloudsmith-isc-bind-dev.repo /etc/yum.repos.d/
RUN echo "config_opts['yum.conf'] += '''$(cat /etc/yum.repos.d/cloudsmith-isc-bind-dev.repo)'''" | tee -a /etc/mock/epel-{6,7,8}-x86_64.cfg
RUN echo "config_opts['print_main_output'] = True" | tee -a /etc/mock/epel-{6,7,8}-x86_64.cfg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment