From e61bcb7af48a47dbe3f0a8dfcdd0ffbd00051339 Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Fri, 17 Apr 2026 10:11:26 +0200 Subject: [PATCH] fix that version is only once --- entrypoint-script/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint-script/entrypoint.sh b/entrypoint-script/entrypoint.sh index 8d6046c..08fce11 100644 --- a/entrypoint-script/entrypoint.sh +++ b/entrypoint-script/entrypoint.sh @@ -91,7 +91,7 @@ function add_docker_socket_permission { local server_api server_api="$(curl -sf --unix-socket /var/run/docker.sock http://localhost/version 2>/dev/null \ - | grep -o '"ApiVersion":"[^"]*"' | cut -d'"' -f4 | tr -d '[:space:]' || true)" + | grep -o '"ApiVersion":"[^"]*"' | head -1 | cut -d'"' -f4 | tr -d '[:space:]' || true)" if [ -n "$server_api" ]; then printf 'export DOCKER_API_VERSION="%s"\n' "$server_api" > /etc/profile.d/docker_api_version.sh printf 'DOCKER_API_VERSION=%s\n' "$server_api" > "/.ssh/environment"