-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-image.sh
executable file
·33 lines (24 loc) · 995 Bytes
/
build-image.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# TAG_NAME=${1:-latest}
# ENV_FILE=${2:-./.env.hie}
# set -o allexport; source "$ENV_FILE"; set +o allexport
# TAG_VERSION=${VERSION:-latest}
# PUSH=${2:-false}
# docker build -t itechuw/sedish-haiti:"$TAG_NAME" -t itechuw/sedish-haiti:"$TAG_VERSION" .
# if [ "$PUSH" = true ]; then
# docker push itechuw/sedish-haiti:"$TAG_NAME"
# docker push itechuw/sedish-haiti:"$TAG_VERSION"
# fi
#!/bin/bash
TAG_NAME=${1:-latest}
# We did not specify a tag so try and use the tag in the config.yaml if present
if [ -z "$1" ]; then
# we grep out 'image: jembi/platform:2.x' from which we cut on : and choose the last column
# this will always be the image tag or an empty string
ImageTag=$(grep 'image:' ${PWD}/config.yaml | cut -d : -f 3)
# only overwrite TAG_NAME if we have a tag present, and it's not just the base image name
if [ -n "$ImageTag" ]; then
TAG_NAME=${ImageTag}
fi
fi
docker build -t itechuw/isanteplus-local:"$TAG_NAME" . --no-cache