From 32ca396ebc0ada42f8afac5b987d8dd61e5392f3 Mon Sep 17 00:00:00 2001 From: Asher Foa Date: Wed, 21 May 2025 18:15:53 -0400 Subject: [PATCH] Ensure docker is installed on running when starting the script (#2415) Signed-off-by: Asher Foa Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 607b77fb..12784dda 100755 --- a/setup.sh +++ b/setup.sh @@ -14,12 +14,17 @@ command_exists() { ensure_required_commands() { # Ensure required commands are available - for cmd in poetry npm; do + for cmd in poetry npm docker; do if ! command_exists "$cmd"; then echo "Error: $cmd is not installed." >&2 exit 1 fi done + # Check docker if running + if ! docker info > /dev/null 2>&1; then + echo "Docker is not running. Please start Docker and try again." + exit 1 + fi } # Function to update or add environment variable in .env file