Skip to content

Commit

Permalink
Use docker --mount instead of --volume
Browse files Browse the repository at this point in the history
This is needed to support colons in the volume name.

Fixes: openSUSE/osc#358 ("--vm-type=docker
not compatible with build_root with common prj names containing ':'")
  • Loading branch information
marcus-h committed Nov 28, 2017
1 parent d2becdc commit d1ca307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-vm-docker
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ vm_startup_docker() {
docker rm "$name" >/dev/null 2>&1 || true
docker run \
--rm --name "$name" --cap-add=sys_admin --cap-add=MKNOD --net=none \
-v "$BUILD_ROOT:/mnt" busybox /bin/chroot /mnt "$vm_init_script"
--mount "type=volume,source=$BUILD_ROOT,destination=/mnt" busybox /bin/chroot /mnt "$vm_init_script"
BUILDSTATUS="$?"
test "$BUILDSTATUS" != 255 || BUILDSTATUS=3
cleanup_and_exit "$BUILDSTATUS"
Expand Down

0 comments on commit d1ca307

Please sign in to comment.