Fixed running docker script from within pwd containing spaces
This commit is contained in:
parent
50e5c01f57
commit
c92638438a
1 changed files with 6 additions and 4 deletions
|
@ -12,9 +12,9 @@ if ! $DOCKER ps >/dev/null; then
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
config_mount=
|
config_mount="/dev/null:/dev/null"
|
||||||
if [ -f config ]; then
|
if [ -f config ]; then
|
||||||
config_mount="-v $(pwd)/config:/pi-gen/config:ro"
|
config_mount="$(pwd)/config:/pi-gen/config:ro"
|
||||||
source config
|
source config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ if [ "$CONTAINER_EXISTS" != "" ]; then
|
||||||
trap "echo 'got CTRL+C... please wait 5s';docker stop -t 5 ${CONTAINER_NAME}_cont" SIGINT SIGTERM
|
trap "echo 'got CTRL+C... please wait 5s';docker stop -t 5 ${CONTAINER_NAME}_cont" SIGINT SIGTERM
|
||||||
time $DOCKER run --rm --privileged \
|
time $DOCKER run --rm --privileged \
|
||||||
--volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \
|
--volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \
|
||||||
|
-e IMG_NAME=${IMG_NAME}\
|
||||||
pi-gen \
|
pi-gen \
|
||||||
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static &&
|
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static &&
|
||||||
cd /pi-gen; ./build.sh;
|
cd /pi-gen; ./build.sh;
|
||||||
|
@ -62,8 +63,9 @@ if [ "$CONTAINER_EXISTS" != "" ]; then
|
||||||
else
|
else
|
||||||
trap "echo 'got CTRL+C... please wait 5s'; docker stop -t 5 ${CONTAINER_NAME}" SIGINT SIGTERM
|
trap "echo 'got CTRL+C... please wait 5s'; docker stop -t 5 ${CONTAINER_NAME}" SIGINT SIGTERM
|
||||||
$DOCKER run --name "${CONTAINER_NAME}" --privileged \
|
$DOCKER run --name "${CONTAINER_NAME}" --privileged \
|
||||||
-v $(pwd)/deploy:/pi-gen/deploy \
|
-e IMG_NAME=${IMG_NAME}\
|
||||||
${config_mount} \
|
-v "$(pwd)/deploy:/pi-gen/deploy" \
|
||||||
|
-v "${config_mount}" \
|
||||||
pi-gen \
|
pi-gen \
|
||||||
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static &&
|
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static &&
|
||||||
cd /pi-gen; ./build.sh &&
|
cd /pi-gen; ./build.sh &&
|
||||||
|
|
Loading…
Reference in a new issue