Skip to content

Commit

Permalink
Merge pull request #70 from kylerisse/centos_eol
Browse files Browse the repository at this point in the history
[READY] update Dockerfile to use alternative CentOS mirror, vault
  • Loading branch information
sarcasticadmin authored Dec 1, 2024
2 parents dbdd1d8 + a325fba commit 38fda09
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
FROM centos:7
# CentOS is EOL https://www.redhat.com/en/blog/centos-linux-vs-rhel
# mirrorlist no longer available
# https://kb.filewave.com/books/linux-tips-and-tricks/page/updating-centos-repo-files-after-mirrorlist-end-of-life
# Alternative is to use vault.centos.org and switch from mirrorlist to baseurl
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN yum update -y && yum install -y httpd php
RUN rm /etc/localtime -f && ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
COPY ["./conf/httpd.conf", "/etc/httpd/conf/httpd.conf"]
Expand Down

0 comments on commit 38fda09

Please sign in to comment.