summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiankang Fan <jiankang.fan@samsung.com>2017-06-28 18:08:11 +0900
committerJiankang Fan <jiankang.fan@samsung.com>2017-06-28 18:09:15 +0900
commit35918c55aff1ba9cbbecc946551b8ad8892b7ebb (patch)
treeeb3938b960d272ba86ea143c4e21082c229d4afc
parent862370c24156fb1c69956d2149317bc093991473 (diff)
downloadbuild-35918c55aff1ba9cbbecc946551b8ad8892b7ebb.tar.gz
build-35918c55aff1ba9cbbecc946551b8ad8892b7ebb.tar.bz2
build-35918c55aff1ba9cbbecc946551b8ad8892b7ebb.zip
add docker server
Change-Id: I9f22f15dfc68ff07cccc1be6a70bc282fd78be40 Signed-off-by: Jiankang Fan <jiankang.fan@samsung.com>
-rw-r--r--build-vm-docker7
1 files changed, 5 insertions, 2 deletions
diff --git a/build-vm-docker b/build-vm-docker
index db3a4eb..3a76637 100644
--- a/build-vm-docker
+++ b/build-vm-docker
@@ -29,8 +29,11 @@ vm_verify_options_docker() {
vm_startup_docker() {
local name="obsbuild.${BUILD_ROOT##*/}"
- docker rm "$name" >/dev/null 2>&1 || true
- docker run \
+ 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 "$name" >/dev/null 2>&1 || true
+ docker -H $docker_server:$docker_port run \
--rm --name "$name" --cap-add=sys_admin --net=none \
-v "$BUILD_ROOT:/mnt" busybox /bin/chroot /mnt "$vm_init_script"
BUILDSTATUS="$?"