Skip to content

Commit

Permalink
Make base image build using the common methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sirsquidness committed Apr 28, 2018
1 parent 5d1a767 commit 44be744
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. ../common.sh

[[ -z $TZ && -f /etc/timezone ]] && TZ=`cat /etc/timezone`
docker build -t base -t base:$(gettimestamp) --build-arg TZ=$TZ .
docker_build base Dockerfile "--build-arg TZ=$TZ"
3 changes: 2 additions & 1 deletion common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ gettimestamp() {
docker_build() {
local NAME=$1
local DOCKERFILE=$2
local OTHERARGS=$3
local CACHE=""

[[ -z $NAME ]] && echo "No name provided for docker build" && exit 1
Expand All @@ -18,7 +19,7 @@ docker_build() {
local PARENT="$(get_docker_parent $NAME)"
[[ -n $PARENT ]] && docker_build_if_needed $PARENT
[[ -n $NOCACHE ]] && CACHE="--no-cache"
(cd $BASE_DIR/$NAME && docker build $DOCKERFILE $CACHE -t $NAME -t $NAME:$(gettimestamp) . )
(cd $BASE_DIR/$NAME && docker build $DOCKERFILE $CACHE $OTHERARGS -t $NAME -t $NAME:$(gettimestamp) . )
}

# Builds a container if it doesn't already have a latest
Expand Down

0 comments on commit 44be744

Please sign in to comment.