diff --git a/precise/docker-builder/src/usr/local/bin/docker-update b/precise/docker-builder/src/usr/local/bin/docker-update index 5e1302cf..24eb0340 100755 --- a/precise/docker-builder/src/usr/local/bin/docker-update +++ b/precise/docker-builder/src/usr/local/bin/docker-update @@ -49,8 +49,10 @@ clean_all() { [ -d "$tmpdir_changes" ] && rm -rf "$tmpdir_changes" } -tmpdir_changes=$(mktemp -d /tmp/$COMPONENT_NAME.changes.XXXXXX) -tmpdir_root=$(mktemp -d /tmp/$COMPONENT_NAME.root.XXXXXX) +tmpdir="$DOCKER_UPDATE_PATH"/tmp +mkdir -p "$tmpdir" +tmpdir_changes=$(mktemp -d $tmpdir/$COMPONENT_NAME.changes.XXXXXX) +tmpdir_root=$(mktemp -d $tmpdir/$COMPONENT_NAME.root.XXXXXX) trap "clean_all" EXIT mount -t aufs -o br=$tmpdir_changes:$DOCKER_UPDATE_PATH/$COMPONENT_NAME -o udba=none none "$tmpdir_root"