#!/usr/bin/env bash

set -x
set -e

docker pull metaskills/mssql-server-linux-rails

container=$(docker ps -a -q --filter ancestor=metaskills/mssql-server-linux-rails)
if [[ -z $container ]]; then
  docker run -p 1433:1433 -d metaskills/mssql-server-linux-rails && sleep 10
  exit
fi

container=$(docker ps -q --filter ancestor=metaskills/mssql-server-linux-rails)
if [[ -z $container ]]; then
  docker start $container && sleep 10
fi

#!/usr/bin/env bash

set -x
set -e

tag=1.1

docker pull metaskills/mssql-server-linux-rails:$tag

container=$(docker ps -a -q --filter ancestor=metaskills/mssql-server-linux-rails:$tag)
if [[ -z $container ]]; then
  docker run -p 1433:1433 -d metaskills/mssql-server-linux-rails:$tag && sleep 10
  exit
fi

container=$(docker ps -q --filter ancestor=metaskills/mssql-server-linux-rails:$tag)
if [[ -z $container ]]; then
  docker start $container && sleep 10
fi

Use "Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64)""
Use "Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64)""
