fix(docker): let the compat image reach the Docker socket on native Linux (#7378)

USER 1001 made the image start unprivileged, so the entrypoint skipped the branch that adds the socket's group and honours FLOCI_RUN_AS_ROOT. With a socket owned by a non-root group and mode 660, Docker-backed services could not launch containers, and FLOCI_RUN_AS_ROOT=true had no effect.

The image now starts as root like the standard one, and the entrypoint drops to uid 1001. HOME is set to /app because that drop keeps the environment: hooks would otherwise run with HOME=/root, which uid 1001 cannot write to, and pip install would fail.

docker exec now defaults to root on this image, as it does on the standard one.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This commit is contained in:
Hector Ventura authored and GitHub committed 2026-11-03 21:23:35 -04:00
1 parent 364d7662a7
commit 01f64e8a5c
4 files changed
+97 -2

No files matched your search

+4
View File
@@ -14,6 +14,7 @@ on:
- 'docker/healthcheck.sh'
- 'docker/run-docker-tests.sh'
- 'docker/test-run-docker-tests.sh'
- 'docker/test-compat-socket.sh'
- 'compatibility-tests/**'
- '.github/ci/compat-timing-report.py'
- '.github/ci/compat-opentofu-drift-check.py'
@@ -94,6 +95,9 @@ jobs:
docker rm -f compat-smoke >/dev/null
[ "$health" = healthy ] || { echo "::error::compat image did not become healthy: $health"; exit 1; }
- name: Compat image reaches a Docker socket owned by a non-root group
run: sh docker/test-compat-socket.sh floci-compat-shim-test
- name: Unflagged aws sqs call routes to AWS_ENDPOINT_URL
run: |
out=$(docker run --rm --entrypoint sh floci-compat-shim-test -c \