Skip to content

Commit 53438bf

Browse files
committed
NYC Yellowcab example: Check if docker is installed, otherwise croak
1 parent d600bf2 commit 53438bf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spikes/testbench-yellowcab/cratedb-import-nyc-yellowcab.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
CONTAINER_NAME=${CONTAINER_NAME:-cratedb}
1515
CRATEDB_IMAGE=${CRATEDB_IMAGE:-crate:4.8.1}
1616

17+
# 0. Sanity checks
18+
if [ ! $(command -v docker) ]; then
19+
echo
20+
echo "ERROR: The 'docker' command was not found. Do you have a working Docker installation?"
21+
echo
22+
exit 1
23+
fi
24+
1725
# 0. Define incantations.
1826
crash="docker run --interactive --rm --network=host ${CRATEDB_IMAGE} crash"
1927
cratedb_start="docker run --detach --rm --publish=4200:4200 --publish=5432:5432 --health-cmd=\"curl http://localhost:4200\" --health-interval=1s --health-start-period=5s --health-retries=15 --name=${CONTAINER_NAME} ${CRATEDB_IMAGE} -Cdiscovery.type=single-node"

0 commit comments

Comments
 (0)