Skip to content

Commit 1617254

Browse files
authored
Merge pull request #7280 from nextcloud/enh/7223/skip-version-check
mastercontainer: fix docker api version check if DOCKER_API_VERSION was set globally
2 parents f1a6526 + 238117a commit 1617254

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Containers/mastercontainer/start.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ fi
116116

117117
# Docker api version check
118118
# shellcheck disable=SC2001
119-
API_VERSION_NUMB="$(echo "$API_VERSION" | sed 's/\.//')"
119+
API_VERSION_NUMB="$(echo "$DOCKER_API_VERSION" | sed 's/\.//')"
120120
LOCAL_API_VERSION_NUMB="$(sudo -E -u www-data docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
121121
if [ -z "$LOCAL_API_VERSION_NUMB" ]; then
122122
LOCAL_API_VERSION_NUMB="$(sudo -E -u www-data DOCKER_API_VERSION="$FALLBACK_DOCKER_API_VERSION" docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
123123
fi
124124
if [ -n "$LOCAL_API_VERSION_NUMB" ] && [ -n "$API_VERSION_NUMB" ]; then
125125
if ! [ "$LOCAL_API_VERSION_NUMB" -ge "$API_VERSION_NUMB" ]; then
126-
print_red "Docker API v$API_VERSION is not supported by your docker engine. Cannot proceed. Please upgrade your docker engine if you want to run Nextcloud AIO!"
126+
print_red "Docker API v$DOCKER_API_VERSION is not supported by your docker engine. Cannot proceed. Please upgrade your docker engine if you want to run Nextcloud AIO!"
127127
echo "Alternatively, set the DOCKER_API_VERSION environmental variable to a compatible version."
128128
echo "However please note that only v$API_VERSION is officially supported and tested by the maintainers of Nextcloud AIO."
129129
echo "See https://github.com/nextcloud/all-in-one#how-to-adjust-the-internally-used-docker-api-version"

0 commit comments

Comments
 (0)