new script docker-build to preconfigure parameters for docker build, set environment variable DOCKER_USER; fixed path in docker-update
parent
15015372ea
commit
adf279d43a
3 changed files with 24 additions and 1 deletions
@ -0,0 +1,18 @@ |
|||||||
|
#!/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,,} . |
Loading…
Reference in new issue