fix that version is only once
Build and Push Docker Container / build-and-push (push) Successful in 55s

This commit is contained in:
2026-04-17 10:11:26 +02:00
parent 1a1c6cbfbe
commit e61bcb7af4
+1 -1
View File
@@ -91,7 +91,7 @@ function add_docker_socket_permission {
local server_api local server_api
server_api="$(curl -sf --unix-socket /var/run/docker.sock http://localhost/version 2>/dev/null \ 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 if [ -n "$server_api" ]; then
printf 'export DOCKER_API_VERSION="%s"\n' "$server_api" > /etc/profile.d/docker_api_version.sh 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" printf 'DOCKER_API_VERSION=%s\n' "$server_api" > "/.ssh/environment"