fix setting of docker socket version and use it over ssh
Build and Push Docker Container / build-and-push (push) Successful in 53s
Build and Push Docker Container / build-and-push (push) Successful in 53s
This commit is contained in:
@@ -93,7 +93,8 @@ function add_docker_socket_permission {
|
||||
server_api="$(curl -sf --unix-socket /var/run/docker.sock http://localhost/version 2>/dev/null \
|
||||
| grep -o '"ApiVersion":"[^"]*"' | cut -d'"' -f4 || true)"
|
||||
if [ -n "$server_api" ]; then
|
||||
echo "DOCKER_API_VERSION=$server_api" >> /etc/environment
|
||||
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"
|
||||
export DOCKER_API_VERSION="$server_api"
|
||||
echo "* Docker API version pinned to $server_api"
|
||||
fi
|
||||
|
||||
@@ -16,6 +16,7 @@ PubkeyAuthentication yes
|
||||
AuthenticationMethods publickey
|
||||
PermitEmptyPasswords no
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
PermitUserEnvironment yes
|
||||
StrictModes yes
|
||||
AllowUsers borg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user