forked from Interanet/server-bootstrap
initial commit
This commit is contained in:
27
scripts/docker/mirrors/runflare.sh
Normal file
27
scripts/docker/mirrors/runflare.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "=========================================="
|
||||
echo "=== Configuring Runflare Docker mirror ==="
|
||||
echo "=========================================="
|
||||
|
||||
mkdir -p /etc/docker
|
||||
|
||||
if [[ -f /etc/docker/daemon.json ]]; then
|
||||
cp /etc/docker/daemon.json /etc/docker/daemon.json.bak
|
||||
echo "Backup created: /etc/docker/daemon.json.bak"
|
||||
fi
|
||||
|
||||
cat > /etc/docker/daemon.json <<EOF
|
||||
{
|
||||
"registry-mirrors": [
|
||||
"https://mirror-docker.runflare.com"
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart docker
|
||||
|
||||
echo "Runflare Docker mirror applied."
|
||||
Reference in New Issue
Block a user