Ensure docker is installed on running when starting the script (#2415)

Signed-off-by: Asher Foa <asher@asherfoa.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
Asher Foa
2025-05-21 18:15:53 -04:00
committed by GitHub
parent bc11625428
commit 32ca396ebc

View File

@@ -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