Skip to content

Commit 80d4e67

Browse files
authored
Fix #1684 (#2234)
Previous situation: we do most of our "check minimum requirements" work in the aptly named check-minimum-requirements.sh. This would be a natural home for the "check if docker even exists on this system" verification, but we actually run call into docker info to set some environment variables before this script gets run, in detect-platforms.sh. So I've adde the "does docker exist" check to that file, directly before we call docker info.
1 parent 7d420d4 commit 80d4e67

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

install/detect-platform.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ echo "${_group}Detecting Docker platform"
1212
# linux/amd64 by default due to virtualization.
1313
# See https://github.com/docker/cli/issues/3286 for the Docker bug.
1414

15-
export DOCKER_ARCH=$(docker info --format '{{.Architecture}}')
15+
if ! command -v docker &>/dev/null; then
16+
echo "FAIL: Could not find a \`docker\` binary on this system. Are you sure it's installed?"
17+
exit 1
18+
fi
1619

20+
export DOCKER_ARCH=$(docker info --format '{{.Architecture}}')
1721
if [[ "$DOCKER_ARCH" = "x86_64" ]]; then
1822
export DOCKER_PLATFORM="linux/amd64"
1923
export CLICKHOUSE_IMAGE="yandex/clickhouse-server:20.3.9.70"

0 commit comments

Comments
 (0)