https://github.com/flavienbwk/centos-mirror-docker
Download a CentOS Linux mirror for yum downloads
https://github.com/flavienbwk/centos-mirror-docker
centos centos-mirror linux linux-mirror mirror offline yum
Last synced: 23 days ago
JSON representation
Download a CentOS Linux mirror for yum downloads
- Host: GitHub
- URL: https://github.com/flavienbwk/centos-mirror-docker
- Owner: flavienbwk
- Created: 2021-03-19T15:13:52.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-31T20:52:54.000Z (about 4 years ago)
- Last Synced: 2025-02-06T21:44:42.355Z (3 months ago)
- Topics: centos, centos-mirror, linux, linux-mirror, mirror, offline, yum
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# centos-mirror-docker
Status : tested & working :heavy_check_mark:
## Downloading & updating
1. Setup your CentOS version and releases in `mirror.sh`
2. Run the `mirror` container :
```bash
docker-compose build
docker-compose up mirror
```> Tips: We recommend you downloading the mirror from [a cloud provider](https://www.scaleway.com/en/) and then transfer the files to your computer.
## Serving
1. Check your mirroring succeeded in `./mirror/*` or typing `du -sh ./mirror` to check the volume
The default configuration should make you download _22G_
2. Run the server :
```bash
docker-compose up -d server
```Server will run on [`localhost:8080`](http://localhost:8080)
## Client configuration
To point your CentOS clients to your mirror, create a `/etc/yum.repos.d/localmirror.repo` file as follow :
```conf
[mymirror-base]
name=My CentOS 7 local mirror for os packages
baseurl=http://localhost:8080/7/os/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1[mymirror-extras]
name=My CentOS 7 local mirror for extras packages
baseurl=http://localhost:8080/7/extras/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1[mymirror-updates]
name=My CentOS 7 local mirror for updates packages
baseurl=http://localhost:8080/7/updates/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1[mymirror-centosplus]
name=My CentOS 7 local mirror for centosplus packages
baseurl=http://localhost:8080/7/centosplus/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
```:point_right: Feel free to add a reverse proxy or update the [nginx configuration file](./nginx.conf) to secure the mirror with SSL/TLS
:point_right: Feel free to send **pull requests** as well !