From ca0e85f31b75907653189cb78dc795d364cbcf7d Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Mon, 8 Dec 2014 13:24:06 +0800 Subject: [PATCH] new: dev: [docker-builder] put all temp dirs in one. --- precise/docker-builder/src/usr/local/bin/docker-update | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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"