#!/bin/sh

set -e

TAG=${1:-latest}
VERSION=${2:-code}
REGISTRY=$3

DOCKERFILE="Dockerfile.$VERSION"

echo "Building Dockerfile.$VERSION"

echo '====================================================='
echo '=============== BUILDING DOCKER IMAGE ==============='
echo '====================================================='

docker build -f $DOCKERFILE . -t $REGISTRY/$VERSION:$TAG
