Skip to content

Commit

Permalink
Apply the centos7 fix to the erlang dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmonteleone committed Oct 23, 2024
1 parent e38bf42 commit 1624b4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions builders/erlang_centos.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ ARG os
ARG os_version
ADD yumdnf /usr/local/bin/

# Fix centos 7 mirrors
RUN --mount=type=cache,id=${os}_${os_version},target=/var/cache/dnf,sharing=private \
--mount=type=cache,id=${os}_${os_version},target=/var/cache/yum,sharing=private \
if [ "${os}:${os_version}" = "centos:7" ]; then \
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo \
&& sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo \
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo; \
fi

# Fix centos 8 mirrors
RUN --mount=type=cache,id=${os}_${os_version},target=/var/cache/dnf,sharing=private \
--mount=type=cache,id=${os}_${os_version},target=/var/cache/yum,sharing=private \
Expand Down

0 comments on commit 1624b4a

Please sign in to comment.