Skip to content

Commit

Permalink
fix centos 7 repo url (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenruizdegauna committed Jul 12, 2024
1 parent 1b7f159 commit 79decbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions molecule/default/dockerfiles/centos7
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM centos:7

## Updating the default repo to vault.centos.org
## Context: https://forketyfork.medium.com/centos-8-no-urls-in-mirrorlist-error-3f87c3466faa
#RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-* \
# && sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-* \
&& sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*

# Run a system update so the system doesn't overwrite the fake systemctl later
RUN yum -y update
Expand All @@ -13,4 +13,4 @@ RUN yum -y install python3-dnf sudo
# Adding fake systemctl
RUN curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py -o /usr/local/bin/systemctl

CMD ["/usr/local/bin/systemctl"]
CMD ["/usr/local/bin/systemctl"]

0 comments on commit 79decbf

Please sign in to comment.