Comment out the creation of daemon.json, more needs work.
This commit is contained in:
parent
4f8a7a5690
commit
9e4951c070
|
|
@ -12,18 +12,18 @@ echo "deb [arch=amd64] https://${URL}/linux/debian buster stable" >> /etc/apt/so
|
||||||
ln -sf /etc/apt/sources.list-available/docker.list /etc/apt/sources.list.d/docker.list
|
ln -sf /etc/apt/sources.list-available/docker.list /etc/apt/sources.list.d/docker.list
|
||||||
|
|
||||||
#bash -c "apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D"
|
#bash -c "apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D"
|
||||||
bash -c "curl -fsSL https://${url}/linux/debian/gpg | apt-key add -"
|
bash -c "curl -fsSL https://${URL}/linux/debian/gpg | apt-key add -"
|
||||||
|
|
||||||
# Bypass apt-proxy for brave packages
|
# Bypass apt-proxy for brave packages
|
||||||
if [ ! -f /etc/apt/apt.conf.d/02proxy ]; then
|
if [ -d /etc/apt/apt.conf.d/02proxy ]; then
|
||||||
mkdir /etc/apt/apt.conf.d/02proxy
|
|
||||||
if [ ! -z $(grep ${URL}) ]; then
|
if [ ! -z $(grep ${URL}) ]; then
|
||||||
echo "Acquire::http::Proxy { ${URL} DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
|
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install -q --no-install-recommends curl ca-certificates
|
|
||||||
apt-get -y install --force-yes jq
|
apt-get -y install --force-yes jq
|
||||||
apt-get remove docker docker-engine docker.io containerd runc
|
apt-get remove docker docker-engine docker.io containerd runc
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
|
|
@ -57,18 +57,20 @@ then
|
||||||
touch /etc/docker/daemon.json
|
touch /etc/docker/daemon.json
|
||||||
echo "{}" > /etc/docker/daemon.json
|
echo "{}" > /etc/docker/daemon.json
|
||||||
else
|
else
|
||||||
echo "/etc/docker/daemon.json exits."
|
echo "/etc/docker/daemon.json exists."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# https://docs.docker.com/engine/security/https/
|
# https://docs.docker.com/engine/security/https/
|
||||||
|
# FIXME: Should be on the same dataset as the docker rpool (/var/lib/docker)
|
||||||
TLS_HOME=/var/docker
|
TLS_HOME=/var/docker
|
||||||
|
|
||||||
DOCKER_OPT[0]='.["storage-driver"] = "zfs"'
|
#DOCKER_OPT[0]='.["dns"] = ["52.174.55.168","188.165.200.156"]'
|
||||||
DOCKER_OPT[1]='.["storage-opts"] = ["zfs.fsname=rpool/docker"]'
|
#DOCKER_OPT[1]='.["live-restore"] = true'
|
||||||
DOCKER_OPT[2]='.["insecure-registries"] = ["soleine.lan:5000"]'
|
#DOCKER_OPT[2]='.["storage-driver"] = "zfs"'
|
||||||
DOCKER_OPT[3]='.["live-restore"] = true'
|
#DOCKER_OPT[3]='.["storage-opts"] = ["zfs.fsname=rpool/docker"]'
|
||||||
DOCKER_OPT[4]='.["hosts"] = ["fd://","unix:///var/run/docker.sock","tcp://0.0.0.0:2376"]'
|
#DOCKER_OPT[4]='.["insecure-registries"] = ["soleine.lan:5000"]'
|
||||||
DOCKER_OPT[5]='.["dns"] = ["52.174.55.168","188.165.200.156"]'
|
#DOCKER_OPT[5]='.["hosts"] = ["fd://","unix:///var/run/docker.sock","tcp://0.0.0.0:2376"]'
|
||||||
|
|
||||||
#DOCKER_OPT[6]='.["dns-opts"] = []'
|
#DOCKER_OPT[6]='.["dns-opts"] = []'
|
||||||
#DOCKER_OPT[7]='.["dns-search"] = []'
|
#DOCKER_OPT[7]='.["dns-search"] = []'
|
||||||
#DOCKER_OPT[8]='.["userland-proxy"] = false'
|
#DOCKER_OPT[8]='.["userland-proxy"] = false'
|
||||||
|
|
@ -129,11 +131,11 @@ mkdir -p ${TLS_HOME}
|
||||||
# -out ${TLS_HOME}/server.pem
|
# -out ${TLS_HOME}/server.pem
|
||||||
|
|
||||||
|
|
||||||
for ((i = 0; i < ${#DOCKER_OPT[@]}; ++i)); do
|
#for ((i = 0; i < ${#DOCKER_OPT[@]}; ++i)); do
|
||||||
OPTION="${DOCKER_OPT[$i]}"
|
# OPTION="${DOCKER_OPT[$i]}"
|
||||||
jq "${OPTION}" /etc/docker/daemon.json > /tmp/daemon.json.new && \
|
# jq "${OPTION}" /etc/docker/daemon.json > /tmp/daemon.json.new && \
|
||||||
mv -b /tmp/daemon.json.new /etc/docker/daemon.json
|
# mv -b /tmp/daemon.json.new /etc/docker/daemon.json
|
||||||
done
|
#done
|
||||||
|
|
||||||
# General options
|
# General options
|
||||||
## Adding a personal registry.
|
## Adding a personal registry.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue