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:
7
setup.sh
7
setup.sh
@@ -14,12 +14,17 @@ command_exists() {
|
|||||||
|
|
||||||
ensure_required_commands() {
|
ensure_required_commands() {
|
||||||
# Ensure required commands are available
|
# Ensure required commands are available
|
||||||
for cmd in poetry npm; do
|
for cmd in poetry npm docker; do
|
||||||
if ! command_exists "$cmd"; then
|
if ! command_exists "$cmd"; then
|
||||||
echo "Error: $cmd is not installed." >&2
|
echo "Error: $cmd is not installed." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
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
|
# Function to update or add environment variable in .env file
|
||||||
|
|||||||
Reference in New Issue
Block a user