Skip to content

Commit

Permalink
docker centos7: use vault.centos.org instead of mirror.centos.org
Browse files Browse the repository at this point in the history
because centos7 default repository was deprecated on 2024-07-01.

NOTE: docker/dev/dist/centos7/src is not buildable with this change, yet
  • Loading branch information
n-soda committed Jul 9, 2024
1 parent 8a81b59 commit 3092cca
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docker/dev/common/centos7-base-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ FROM centos:7
ARG TZ
ENV TZ=${TZ}

# 2024-07-01: original yum repository was deprecated
RUN cp -p /etc/yum.repos.d/CentOS-Base.repo \
/etc/yum.repos.d/CentOS-Base.repo.bak && \
sed -e '/^mirrorlist=/s/^/#/' \
-e '/^#baseurl=/s|^#baseurl=http://mirror|baseurl=http://vault|' \
/etc/yum.repos.d/CentOS-Base.repo.bak \
>/etc/yum.repos.d/CentOS-Base.repo

RUN sed -i -e '/override_install_langs/s/$/,ja_JP.utf8/g' /etc/yum.conf \
&& sed -i -e '/tsflags=nodocs/s/^/#/' /etc/yum.conf \
&& yum -y update \
Expand Down
8 changes: 8 additions & 0 deletions docker/dist/centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ FROM centos:7
ARG USERNAME=foo
ARG UID=1000

# 2024-07-01: original yum repository was deprecated
RUN cp -p /etc/yum.repos.d/CentOS-Base.repo \
/etc/yum.repos.d/CentOS-Base.repo.bak && \
sed -e '/^mirrorlist=/s/^/#/' \
-e '/^#baseurl=/s|^#baseurl=http://mirror|baseurl=http://vault|' \
/etc/yum.repos.d/CentOS-Base.repo.bak \
>/etc/yum.repos.d/CentOS-Base.repo

RUN yum -y update \
&& yum -y install \
git wget rpm-build sudo passwd \
Expand Down
8 changes: 8 additions & 0 deletions docker/dist/centos7a/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ FROM centos:7
ARG USERNAME=foo
ARG UID=1000

# 2024-07-01: original yum repository was deprecated
RUN cp -p /etc/yum.repos.d/CentOS-Base.repo \
/etc/yum.repos.d/CentOS-Base.repo.bak && \
sed -e '/^mirrorlist=/s/^/#/' \
-e '/^#baseurl=/s|^#baseurl=http://mirror|baseurl=http://vault|' \
/etc/yum.repos.d/CentOS-Base.repo.bak \
>/etc/yum.repos.d/CentOS-Base.repo

RUN yum -y update \
&& yum -y install \
git wget rpm-build sudo passwd \
Expand Down

0 comments on commit 3092cca

Please sign in to comment.