Skip to content

Commit

Permalink
Replace centos with rocky
Browse files Browse the repository at this point in the history
CentOS no longer updates its image on Docker Hub, and it is nearly at the end of its life.
  • Loading branch information
taoky committed Jun 5, 2024
1 parent b481a19 commit 5f7d3bf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
17 changes: 0 additions & 17 deletions build-centos.sh

This file was deleted.

22 changes: 22 additions & 0 deletions build-rocky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
source common.sh
docker-tags rockylinux |
while read tag; do
dockerfile=$(mktemp)
cat << EOF > $dockerfile
FROM rockylinux:$tag
RUN sed -i \
-e 's/mirrorlist/#mirrorlist/g' \
-e 's/#baseurl/baseurl/g' \
-e 's|dl.rockylinux.org/\$contentdir|mirrors.ustc.edu.cn/rocky|g' \
/etc/yum.repos.d/Rocky-*.repo || \
sed -i \
-e 's/mirrorlist/#mirrorlist/g' \
-e 's/#baseurl/baseurl/g' \
-e 's|dl.rockylinux.org/\$contentdir|mirrors.ustc.edu.cn/rocky|g' \
/etc/yum.repos.d/rocky*.repo
EOF
docker build -f $dockerfile -t ustclug/rocky:$tag .
docker push ustclug/rocky:$tag
rm $dockerfile
done

0 comments on commit 5f7d3bf

Please sign in to comment.