mirror of
https://github.com/aykhans/my-self-host-services.git
synced 2026-07-13 20:37:40 +00:00
preflight: ensure ~/.docker/config.json is a file (watchtower mount)
This commit is contained in:
@@ -88,6 +88,13 @@ fix_permissions() {
|
|||||||
start_services() {
|
start_services() {
|
||||||
fix_permissions
|
fix_permissions
|
||||||
|
|
||||||
|
# Ensure ~/.docker/config.json is a FILE before any container mounts it.
|
||||||
|
# watchtower bind-mounts it; if it is missing, the Docker daemon creates it
|
||||||
|
# as a root-owned directory, which then breaks every docker CLI call.
|
||||||
|
mkdir -p ~/.docker
|
||||||
|
[ -d ~/.docker/config.json ] && sudo rmdir ~/.docker/config.json
|
||||||
|
[ -f ~/.docker/config.json ] || echo '{}' > ~/.docker/config.json
|
||||||
|
|
||||||
docker network create caddy 2>/dev/null
|
docker network create caddy 2>/dev/null
|
||||||
docker network create grafana 2>/dev/null
|
docker network create grafana 2>/dev/null
|
||||||
docker network create gitea 2>/dev/null
|
docker network create gitea 2>/dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user