2024-10-10

This commit is contained in:
2024-10-10 12:56:56 +08:00
commit 7b347c848a
2648 changed files with 643965 additions and 0 deletions

15
install/add_dns_to_docker.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
DNS=`cat /etc/resolv.conf |grep nameserver|awk '{print $2}' | tail -1 `
cd /etc/docker
if grep 'dns' daemon.json > /dev/null ; then
echo "has dns"
else
head -`wc -l daemon.json |awk '{print $1-1}'` daemon.json > new.json
echo ", \"dns\": [\"$DNS\", \"8.8.8.8\", \"114.114.114.114\"] " >> new.json
echo '}' >> new.json
mv daemon.json old.json
mv new.json daemon.json
fi