docker build command can now take Dockerfile as argument

This commit is contained in:
jash
2018-10-08 23:47:13 +02:00
committed by kexkey
parent b285c2ded6
commit b67db12ef0
2 changed files with 13 additions and 2 deletions

View File

@@ -1,6 +1,12 @@
build_docker_image() {
local dockerfile="Dockerfile"
if [[ ""$3 != "" ]]; then
dockerfile=$3
fi
trace "building docker image: $2:latest"
docker build -q $1 -t $2:latest > /dev/null
docker build -q $1 -f $1/$dockerfile -t $2:latest > /dev/null
}