knex/scripts/docker-for-test.sh
smulesoft 31ba04a788 fixes #1833 on postgres (#2017)
* fixes #1833 on postgres

* adds @elhigu requested changes

* adds test when database is down

* adds script for docker support

* removes old comment

* fixes syntax

* fixes more syntax errors

* fixes final syntax errors

* Docker testing enabled only on linux for now
2017-06-01 22:41:35 +03:00

15 lines
368 B
Bash

#!/usr/bin/env bash
if [ -n "$(which docker)" ]; then
DOCKER_IMAGES=("mysql:5.7" "postgres:9.6")
for image in ${DOCKER_IMAGES[@]}; do
if [ -z "$(docker images -q ${image})" ]; then
echo "Installing Docker image ${image}"
docker pull ${image}
else
echo "Docker image ${image} found!"
fi
done
fi