Commit fe34cc23 authored by Wes Brown's avatar Wes Brown

Add docker image builder script.

parent 9240d7ea
#!/bin/sh
# Arguments
BUILD=${1:-"dev"}
TARGET=${2:-"local"}
# shift args out for later call
if [ $# -eq 1 ]; then
shift
elif [ $# -ge 2 ]; then
shift 2
fi
TAG=$(echo "${GITHUB_SHA:-$(git rev-parse HEAD)}" | cut -c -7)
# Docker Values
IMAGE_REPO=gooseai/basedformer
if [ "$BUILD" = "dev" ]; then
IMAGE_REPO=gooseai/basedformer
fi
# Docker build / publish
if [ "$TARGET" = "local" ]; then
docker build . -t $IMAGE_REPO:$TAG -t $IMAGE_REPO $@
else
docker build . -t $IMAGE_REPO:$TAG $@
docker push . -t $IMAGE_REPO:$TAG
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment