Update daemon.json creation function.
Limit log size and allow containers to run independently of dockerd.
This commit is contained in:
parent
6ca4256b3e
commit
fbff382696
|
|
@ -128,15 +128,17 @@ fi
|
|||
|
||||
declare -A DOCKER_OPT
|
||||
DOCKER_OPT[0]='.["dns"] = ["1.1.1.1","1.0.0.1"]'
|
||||
DOCKER_OPT[1]='.["live-restore"] = false'
|
||||
DOCKER_OPT[1]='.["live-restore"] = true'
|
||||
DOCKER_OPT[2]='.["storage-driver"] = "zfs"'
|
||||
DOCKER_OPT[3]='.["storage-opts"] = ["zfs.fsname=rpool/docker"]'
|
||||
DOCKER_OPT[4]='.["ipv6"] = false'
|
||||
DOCKER_OPT[5]='.["insecure-registries"] = ["soleine.lan:5000"]'
|
||||
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[8]='.["hosts"] = ["fd://","unix:///var/run/docker.sock","tcp://0.0.0.0:2376"]'
|
||||
#DOCKER_OPT[9]='.["experimental"] = true'
|
||||
DOCKER_OPT[8]='.["log-driver"] = "json-file"'
|
||||
DOCKER_OPT[9]='.["log-opts"] = {"max-size": "10m", "max-file": "3"}'
|
||||
#DOCKER_OPT[10]='.["hosts"] = ["fd://","unix:///var/run/docker.sock","tcp://0.0.0.0:2376"]'
|
||||
#DOCKER_OPT[11]='.["experimental"] = true'
|
||||
|
||||
# Change /etc/rc.conf to set cgroup v2
|
||||
sed -i '/^#rc_cgroup_mode=.*/ s/.*/&\nrc_cgroup_mode=\"unified\"/' /etc/rc.conf
|
||||
|
|
|
|||
Loading…
Reference in New Issue