From 741daf79a0941cd87513ec4c134e67ad806605e9 Mon Sep 17 00:00:00 2001 From: "shuai.fu" Date: Tue, 11 Jul 2017 18:19:17 +0900 Subject: [PATCH] Specify building script when docker startup in obsworker. Change-Id: I8efa44d576e0e209120726c538280aa47eb53a02 Signed-off-by: shuai.fu --- build-vm-docker | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-vm-docker b/build-vm-docker index cd1558d..5e8e2d5 100644 --- a/build-vm-docker +++ b/build-vm-docker @@ -29,13 +29,14 @@ vm_verify_options_docker() { vm_startup_docker() { local name="obsbuild.${BUILD_ROOT##*/}" + local vm_init_script_docker="/.build/build" local docker_server=`cat /etc/hosts | grep docker | cut -f 1` local docker_port=`cat /etc/hosts | grep docker | cut -f 2` docker_port=${docker_port#docker} docker -H $docker_server:$docker_port rm --privileged "$name" >/dev/null 2>&1 || true docker -H $docker_server:$docker_port run --privileged\ --rm --name "$name" --cap-add=sys_admin --net=none \ - -v "$BUILD_ROOT:/mnt" busybox /bin/chroot /mnt "$vm_init_script" + -v "$BUILD_ROOT:/mnt" busybox /bin/chroot /mnt "$vm_init_script_docker" BUILDSTATUS="$?" test "$BUILDSTATUS" != 255 || BUILDSTATUS=3 cleanup_and_exit "$BUILDSTATUS" -- 2.7.4