You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 weeks ago | |
|---|---|---|
| .containerignore | 2 weeks ago | |
| .gitignore | 2 weeks ago | |
| Containerfile | 2 weeks ago | |
| README.md | 2 weeks ago | |
| build.sh | 2 weeks ago | |
| nginx.conf | 2 weeks ago | |
| rsync-excludes.txt | 2 weeks ago | |
README.md
Local mirror for CentOS Stream & EPEL in a container image
Creates local mirrors of the CentOS Stream & EPEL repositories and stores them as container images to keep an history and optimize storage consumption.
Usage
Create & serve the mirror.
# Create a local mirror of CentOS Stream 10
./build.sh
# Serve the mirror on port 8080
podman run --rm --name mirror-centos-stream-10-$(date -I) -p 8080:8080 localhost/mirrors/centos-stream-10:$(date -I)
# Mirror is alive!
curl http://localhost:8080/centos/10-stream/BaseOS/x86_64/iso/SHA256SUM
# Archive the mirror for posterity
podman tag localhost/mirrors/centos-stream-10:$(date -I) quay.io/nmasse-redhat/centos-stream-10:$(date -I)
podman push --compression-format=none quay.io/nmasse-redhat/centos-stream-10:$(date -I)
To use it in a working system, create /etc/yum.repos.d/local-mirror.repo with the following content:
[local-centos-stream]
name=Local CentOS Stream $releasever
baseurl=http://local.mirror.tld:8080/centos/10-stream/BaseOS/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official
[local-epel]
name=Local EPEL $releasever
baseurl=http://local.mirror.tld:8080/epel/10/Everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-10
To perform an unattended install, add the following lines in your kickstart file:
url --url=http://local.mirror.tld/centos/10-stream/BaseOS/$basearch/os/
repo --name=epel --baseurl=http://local.mirror.tld:8080/epel/10/Everything/$basearch/
Authors
- Claude Code
- Nicolas Massé