fix that version is only once
Build and Push Docker Container / build-and-push (push) Successful in 55s
Build and Push Docker Container / build-and-push (push) Successful in 55s
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user