diff --git a/entrypoint-script/entrypoint.sh b/entrypoint-script/entrypoint.sh index beb8145..4eb8506 100644 --- a/entrypoint-script/entrypoint.sh +++ b/entrypoint-script/entrypoint.sh @@ -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 diff --git a/sshd_config b/sshd_config index 4824d48..9a8f345 100644 --- a/sshd_config +++ b/sshd_config @@ -16,6 +16,7 @@ PubkeyAuthentication yes AuthenticationMethods publickey PermitEmptyPasswords no AuthorizedKeysFile .ssh/authorized_keys +PermitUserEnvironment yes StrictModes yes AllowUsers borg