mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-27 01:51:30 +02:00
Docker CLI guard added to enterprise and migrate
This commit is contained in:
@@ -106,7 +106,12 @@ apply_docker_subnet_override() {
|
||||
# NETBIRD_DOCKER_SUBNET covers those cases.
|
||||
check_docker_subnet_conflicts() {
|
||||
local expected_network="$1"
|
||||
command -v docker &> /dev/null || return 0
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "ERROR: the Docker CLI was not found in PATH." > /dev/stderr
|
||||
echo "It is required to verify that $DOCKER_SUBNET is free before this install pins it." > /dev/stderr
|
||||
echo "Install Docker (https://docs.docker.com/engine/install/) and run this script again." > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# docker's own stderr is left visible on purpose: "is the daemon running"
|
||||
# and socket permission errors are the actionable part. Only the exit status
|
||||
|
||||
@@ -194,7 +194,13 @@ apply_docker_subnet_override() {
|
||||
# later. Host routes are not checked; NETBIRD_DOCKER_SUBNET covers those cases.
|
||||
check_docker_subnet_conflicts() {
|
||||
local expected_network="$1"
|
||||
command -v docker &> /dev/null || return 0
|
||||
if ! command -v docker &> /dev/null; then
|
||||
log_error "The Docker CLI was not found in PATH."
|
||||
echo "It is required to verify that $DOCKER_SUBNET is free before the new compose file is written."
|
||||
echo "The old deployment is stopped at this point; restart it with:"
|
||||
echo " bash $BACKUP_DIR/rollback.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# docker's own stderr is left visible on purpose: "is the daemon running"
|
||||
# and socket permission errors are the actionable part. Only the exit status
|
||||
|
||||
Reference in New Issue
Block a user