Log size control and additional registry mirror.
This commit is contained in:
parent
da01b8ee97
commit
1338587ae6
|
|
@ -127,6 +127,7 @@ fi
|
||||||
# NB live-restore is incompatible with swarm mode.
|
# NB live-restore is incompatible with swarm mode.
|
||||||
|
|
||||||
declare -A DOCKER_OPT
|
declare -A DOCKER_OPT
|
||||||
|
|
||||||
DOCKER_OPT[0]='.["dns"] = ["1.1.1.1","1.0.0.1"]'
|
DOCKER_OPT[0]='.["dns"] = ["1.1.1.1","1.0.0.1"]'
|
||||||
DOCKER_OPT[1]='.["live-restore"] = true'
|
DOCKER_OPT[1]='.["live-restore"] = true'
|
||||||
DOCKER_OPT[2]='.["storage-driver"] = "zfs"'
|
DOCKER_OPT[2]='.["storage-driver"] = "zfs"'
|
||||||
|
|
@ -135,10 +136,11 @@ DOCKER_OPT[4]='.["ipv6"] = false'
|
||||||
DOCKER_OPT[5]='.["insecure-registries"] = ["soleine.lan:5000"]'
|
DOCKER_OPT[5]='.["insecure-registries"] = ["soleine.lan:5000"]'
|
||||||
DOCKER_OPT[6]='.["features"] = {"buildkit": true}'
|
DOCKER_OPT[6]='.["features"] = {"buildkit": true}'
|
||||||
DOCKER_OPT[7]='.["exec-opts"] = ["native.cgroupdriver=cgroupfs"]' # if omitted docker defaults to cgroupfs v1 and docker exec will fail, /etc/rc.conf rc_cgroup_mode="unified"
|
DOCKER_OPT[7]='.["exec-opts"] = ["native.cgroupdriver=cgroupfs"]' # if omitted docker defaults to cgroupfs v1 and docker exec will fail, /etc/rc.conf rc_cgroup_mode="unified"
|
||||||
DOCKER_OPT[8]='.["log-driver"] = "json-file"'
|
DOCKER_OPT[8]='.["registry-mirrors"] = ["https://git2.ring-zero.co.uk", "https://mirror.gcr.io"]'
|
||||||
DOCKER_OPT[9]='.["log-opts"] = {"max-size": "10m", "max-file": "3"}'
|
DOCKER_OPT[9]='.["log-driver"] = "json-file"'
|
||||||
#DOCKER_OPT[10]='.["hosts"] = ["fd://","unix:///var/run/docker.sock","tcp://0.0.0.0:2376"]'
|
DOCKER_OPT[10]='.["log-opts"] = {"max-size": "10m", "max-file": "3"}'
|
||||||
#DOCKER_OPT[11]='.["experimental"] = true'
|
#DOCKER_OPT[11]='.["hosts"] = ["fd://","unix:///var/run/docker.sock","tcp://0.0.0.0:2376"]'
|
||||||
|
#DOCKER_OPT[12]='.["experimental"] = true'o
|
||||||
|
|
||||||
# Change /etc/rc.conf to set cgroup v2
|
# Change /etc/rc.conf to set cgroup v2
|
||||||
sed -i '/^#rc_cgroup_mode=.*/ s/.*/&\nrc_cgroup_mode=\"unified\"/' /etc/rc.conf
|
sed -i '/^#rc_cgroup_mode=.*/ s/.*/&\nrc_cgroup_mode=\"unified\"/' /etc/rc.conf
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue