#!/usr/bin/env bash
set -ex

#if [[ -z "${DKREGISTRY_PASS}" ]]; then
#    docker login -u richard -p $DKREGISTRY_PASS $DKREGISTRY
#fi

docker build --rm -f Dockerfile -t xaicorp/php-robo .
docker run --rm xaicorp/php-robo --version | grep 'Robo 2.0.'
docker run --rm --entrypoint docker xaicorp/php-robo -v | grep "Docker version"
docker run --rm --entrypoint which xaicorp/php-robo docker-compose | grep "docker-compose"
docker run --rm --entrypoint php xaicorp/php-robo -m | grep 'curl'
docker tag xaicorp/php-robo dkregistry.xai-corp.net:5000/xaicorp/php-robo
docker push dkregistry.xai-corp.net:5000/xaicorp/php-robo

