Skip to content

fix(compose): make the agent's docker group GID configurable - #3

Merged
mattDev0 merged 1 commit into
mainfrom
fix/docker-gid-portable
Aug 31, 2026
Merged

fix(compose): make the agent's docker group GID configurable#3
mattDev0 merged 1 commit into
mainfrom
fix/docker-gid-portable

Conversation

@mattDev0

Copy link
Copy Markdown
Owner

Found while migrating to the replacement VM after the old Azure subscription was disabled.

Problem

Both compose files pinned the agent to user: "10001:988". 988 was the docker group GID on the previous host. On the new VM it is 998, so the agent could not read /var/run/docker.sock:

ERROR agent::docker: Failed to list Docker containers:
  error trying to connect: Permission denied (os error 13)

The orchestrator surfaced that as a 500 and the Docker panel came up empty — the one feature set still fully functional now that there is no cluster.

Because docker-compose.prod.yml also set user:, patching only the base file had no effect; the override won.

Fix

user: "10001:${DOCKER_GID:-998}"

in both files, plus .env.example documenting how to find the value:

getent group docker | cut -d: -f3

Already applied on the running host, where the agent now lists all 7 containers correctly. This commit is what makes it survive deploy.sh's git reset --hard.

Note

A hardcoded host GID in a committed compose file is portable right up until the host changes. The default keeps existing behaviour on a matching host; the variable makes the next migration a one-line .env change instead of a debugging session.

The agent was pinned to user "10001:988" in both compose files. 988 was the
docker group GID on the previous VM; on the replacement host it is 998, so
the agent could not read /var/run/docker.sock and every Docker query failed
with "Permission denied (os error 13)". The orchestrator surfaced that as a
500, leaving the Docker panel empty - the one feature set still fully
functional now that the cluster is gone.

Reads DOCKER_GID from the environment with a 998 default, and documents in
.env.example how to find the right value for a host.
@mattDev0
mattDev0 merged commit c48d33e into main Aug 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant