From 039dff0053c9549eafc2e8a0e72e335bdf3ce365 Mon Sep 17 00:00:00 2001 From: Fernando Diaz Date: Wed, 17 Sep 2025 13:51:25 +0200 Subject: [PATCH] Fix centos8 repos --- hammer/Dockerfile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/hammer/Dockerfile b/hammer/Dockerfile index 100a589..36ce278 100644 --- a/hammer/Dockerfile +++ b/hammer/Dockerfile @@ -1,9 +1,24 @@ -FROM quay.io/centos/centos:stream8 +FROM centos:8 ARG foreman_url=https://foreman.example.com -RUN dnf install -y epel-release \ - python3 +# Pint to Vault and clean repos +RUN sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ + && sed -i 's|#baseurl=.*|baseurl=http://vault.centos.org/8.5.2111/BaseOS/x86_64/os/|g' /etc/yum.repos.d/CentOS-* \ + && echo -e "[AppStream]\nname=CentOS-8.5.2111 - AppStream\nbaseurl=http://vault.centos.org/8.5.2111/AppStream/x86_64/os/\nenabled=1\ngpgcheck=0" >> /etc/yum.repos.d/CentOS-AppStream.repo \ + && dnf clean all + +# Install wget and clean dependencies +RUN dnf -y install wget python3 python3-virtualenv python3-pip git rpm-build \ + && dnf clean all + +# Install wget y EPEL +RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ + && rpm -ivh epel-release-latest-8.noarch.rpm \ + && dnf clean all + +RUN python3 -m pip install --upgrade pip \ + && python3 -m pip install "ansible==2.10.7" RUN dnf install -y --skip-broken https://yum.theforeman.org/releases/2.1/el8/x86_64/foreman-release.rpm \ https://yum.theforeman.org/releases/2.1/el8/x86_64/rubygem-hammer_cli-2.1.0-1.el8.noarch.rpm \