-
Notifications
You must be signed in to change notification settings - Fork 5
fix: use Docker server's current API version instead of minimum #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -227,13 +227,13 @@ validate_log_directory_mount() { | |
|
|
||
| # Set DOCKER_API_VERSION based on architecture and Docker daemon requirements | ||
| set_docker_api_version() { | ||
| # First, check what the Docker daemon requires as minimum API version | ||
| local min_api=$(docker version --format '{{.Server.MinAPIVersion}}' 2>/dev/null || echo "") | ||
| # Get the server's current API version (what it actually supports) | ||
| local server_api=$(docker version --format '{{.Server.APIVersion}}' 2>/dev/null || echo "") | ||
|
|
||
| if [ -n "$min_api" ]; then | ||
| # Use the daemon's minimum API version to ensure compatibility | ||
| export DOCKER_API_VERSION="$min_api" | ||
| log_info "Set DOCKER_API_VERSION=$DOCKER_API_VERSION (daemon minimum)" | ||
| if [ -n "$server_api" ]; then | ||
| # Use the server's current API version for full compatibility | ||
| export DOCKER_API_VERSION="$server_api" | ||
| log_info "Set DOCKER_API_VERSION=$DOCKER_API_VERSION (server current)" | ||
| else | ||
| # Fallback: set based on architecture | ||
| local arch=$(uname -m) | ||
|
Comment on lines
238
to
239
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback logic is redundant as both branches of the conditional set DOCKER_API_VERSION to the same value (1.44). The architecture check doesn't actually influence the version selection. Either remove the architecture-based conditional or set different versions for different architectures if that's the intended behavior.