Docker build script

This commit is contained in:
Paul Warren 2022-08-11 01:29:19 +00:00
parent fb295ac8f2
commit e9f2922d7f
1 changed files with 9 additions and 0 deletions

9
docker_build Normal file
View File

@ -0,0 +1,9 @@
VERSION=$(git log -1 --pretty=%h)
REPO="dockerhub.kube:5000/desteg:
TAG="$REPO$VERSION"
LATEST="${REPO}latest"
TS=$( date '+%F_%H:%M:%S; )\\
docker build -t "$TAG" -t "$LATEST" --build-arg VERSION="$VERSION" --build-arg BUILD_TIMESTAMP="$BUILD_TIMESTAMP" .
docker push "$TAG"
docker push "$LATEST"