website/docker/build.sh
Andrei Jiroh Halili 03c329238f
docs(docker): update docker image README and build script
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.xyz>
2024-06-07 17:55:24 +08:00

17 lines
No EOL
359 B
Bash
Executable file

#!/usr/bin/env bash
set -xe
ROOTDIR=$(git rev-parse --show-toplevel)
CONTEXT=$ROOTDIR/docker
DOCKERFILE=$CONTEXT/Dockerfile
TAG=${IMAGE_TAG:-"quay.io/ajhalili2006/mkdocs-material-build-ci:localdev"}
DOCKER_BUILDKIT=${DOCKER_BUILDKIT:-"1"} \
docker build \
-t $TAG \
-f "$DOCKERFILE" \
"$CONTEXT"
if [[ $DEPLOY != "" ]]; then
docker push "$TAG"
fi