Mirror for installing Docker on CentOS
-
Setup your CentOS version and arch in
mirror.sh
-
Run the
mirror
container :docker-compose build docker-compose up mirror
Tips: We recommend you downloading the mirror from a cloud provider and then transfer the files to your computer.
-
Check your mirroring succeeded in
./mirror/*
or typingdu -sh ./mirror
to check the volumeThe default configuration should make you download 7.9 G
-
Run the server :
docker-compose up -d server
Server will run on
localhost:8080
To point your CentOS clients to your mirror, create a /etc/yum.repos.d/local-docker-mirror.repo
file as follow :
[local-docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=http://localhost:8080/centos/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=http://localhost:8080/gpg
[local-docker-ce-stable-debuginfo]
name=Docker CE Stable - Debuginfo $basearch
baseurl=http://localhost:8080/centos/$releasever/debug-$basearch/stable
enabled=0
gpgcheck=1
gpgkey=http://localhost:8080/gpg
[local-docker-ce-stable-source]
name=Docker CE Stable - Sources
baseurl=http://localhost:8080/centos/$releasever/source/stable
enabled=0
gpgcheck=1
gpgkey=http://localhost:8080/gpg
[local-docker-ce-test]
name=Docker CE Test - $basearch
baseurl=http://localhost:8080/centos/$releasever/$basearch/test
enabled=0
gpgcheck=1
gpgkey=http://localhost:8080/gpg
[local-docker-ce-test-debuginfo]
name=Docker CE Test - Debuginfo $basearch
baseurl=http://localhost:8080/centos/$releasever/debug-$basearch/test
enabled=0
gpgcheck=1
gpgkey=http://localhost:8080/gpg
[local-docker-ce-test-source]
name=Docker CE Test - Sources
baseurl=http://localhost:8080/centos/$releasever/source/test
enabled=0
gpgcheck=1
gpgkey=http://localhost:8080/gpg
[local-docker-ce-nightly]
name=Docker CE Nightly - $basearch
baseurl=http://localhost:8080/centos/$releasever/$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=http://localhost:8080/gpg
[local-docker-ce-nightly-debuginfo]
name=Docker CE Nightly - Debuginfo $basearch
baseurl=http://localhost:8080/centos/$releasever/debug-$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=http://localhost:8080/gpg
[local-docker-ce-nightly-source]
name=Docker CE Nightly - Sources
baseurl=http://localhost:8080/centos/$releasever/source/nightly
enabled=0
gpgcheck=1
gpgkey=http://localhost:8080/gpg
👉 Please cite my work if you're using it !
👉 Feel free to send pull requests as well !