You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
371 B

#!/bin/bash -x
if test $# -gt 0 -a "${1#-}" = "${1}"; then
name=$1
shift
else
name=$(pwd | sed 's,.*/,,')
fi
if test "$name" = "docker"; then
name=$(pwd | sed 's,/[^/]*$,,;s,.*/,,')
fi
if test "${name#*/}" = "${name}"; then
name=${DOCKER_USER:-mwaeckerlin}/${name}
fi
echo "**** building $name"
set -x
docker build $* --rm --force-rm -t ${name,,} .