mirror of
https://github.com/casjaysdevdocker/gitea
synced 2025-12-14 02:07:10 -05:00
🗃️ Update codebase 🗃️
All checks were successful
release-tag / release-image (push) Successful in 6m43s
All checks were successful
release-tag / release-image (push) Successful in 6m43s
rootfs/tmp/etc/docker/daemon.json rootfs/usr/local/etc/docker/init.d/05-dockerd.sh
This commit is contained in:
@@ -5,5 +5,10 @@
|
|||||||
"experimental": true,
|
"experimental": true,
|
||||||
"pidfile": "/tmp/docker.pid",
|
"pidfile": "/tmp/docker.pid",
|
||||||
"cgroup-parent": "/docker",
|
"cgroup-parent": "/docker",
|
||||||
|
"default-address-pools": [
|
||||||
|
{"base": "172.17.0.0/12", "size": 24},
|
||||||
|
{"base": "192.168.0.0/16", "size": 24},
|
||||||
|
{"base": "10.0.0.0/8", "size": 24}
|
||||||
|
],
|
||||||
"insecure-registries": ["localhost"]
|
"insecure-registries": ["localhost"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -297,6 +297,21 @@ __run_pre_execute_checks() {
|
|||||||
else
|
else
|
||||||
echo "Warning: cgroup v2 not available, Docker-in-Docker may have limited functionality"
|
echo "Warning: cgroup v2 not available, Docker-in-Docker may have limited functionality"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up orphaned containers before dockerd starts
|
||||||
|
# This prevents "failed to load container" errors on restart
|
||||||
|
if [ -d "/data/docker/containers" ]; then
|
||||||
|
echo "Checking for orphaned containers"
|
||||||
|
for container_dir in /data/docker/containers/*/; do
|
||||||
|
if [ -d "$container_dir" ]; then
|
||||||
|
if [ ! -f "${container_dir}config.v2.json" ]; then
|
||||||
|
echo "Removing orphaned container: $(basename "$container_dir")"
|
||||||
|
rm -rf "$container_dir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
[ -L "/config/docker/daemon.json" ] && unlink "/config/docker/daemon.json"
|
[ -L "/config/docker/daemon.json" ] && unlink "/config/docker/daemon.json"
|
||||||
if [ -n "$DOCKER_REGISTRIES" ]; then
|
if [ -n "$DOCKER_REGISTRIES" ]; then
|
||||||
local set_reg=""
|
local set_reg=""
|
||||||
@@ -338,6 +353,11 @@ EOF
|
|||||||
"experimental": true,
|
"experimental": true,
|
||||||
"pidfile": "/tmp/docker.pid",
|
"pidfile": "/tmp/docker.pid",
|
||||||
"cgroup-parent": "/docker",
|
"cgroup-parent": "/docker",
|
||||||
|
"default-address-pools": [
|
||||||
|
{"base": "172.17.0.0/12", "size": 24},
|
||||||
|
{"base": "192.168.0.0/16", "size": 24},
|
||||||
|
{"base": "10.0.0.0/8", "size": 24}
|
||||||
|
],
|
||||||
"insecure-registries": [$registry]
|
"insecure-registries": [$registry]
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@@ -349,7 +369,12 @@ EOF
|
|||||||
"log-level": "error",
|
"log-level": "error",
|
||||||
"experimental": true,
|
"experimental": true,
|
||||||
"pidfile": "/tmp/docker.pid",
|
"pidfile": "/tmp/docker.pid",
|
||||||
"cgroup-parent": "/docker"
|
"cgroup-parent": "/docker",
|
||||||
|
"default-address-pools": [
|
||||||
|
{"base": "172.17.0.0/12", "size": 24},
|
||||||
|
{"base": "192.168.0.0/16", "size": 24},
|
||||||
|
{"base": "10.0.0.0/8", "size": 24}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user