From 9c672574e55a51aed0793bf51f65de767de4e250 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Tue, 7 Sep 2021 15:47:54 -0700 Subject: [PATCH] hack: allow mounting in workdir in shell Signed-off-by: Tonis Tiigi --- hack/shell | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hack/shell b/hack/shell index b0948184..13f94c1b 100755 --- a/hack/shell +++ b/hack/shell @@ -14,4 +14,11 @@ SSH= if [ -n "$MOUNT_SSH_AUTH_SOCK" ]; then SSH="-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK -e SSH_AUTH_SOCK" fi -docker run $SSH -it --privileged -v /tmp --net=host -e BUILDKIT_REGISTRY_MIRROR_DIR=/root/.cache/registry --rm $(cat $iidfile) + +volumes= +if [ -n "$MOUNT_BUILDKIT_SOURCE" ]; then + volumes="-v $(pwd):/src" +fi + +set -x +docker run $SSH $volumes -it --privileged -v /tmp --net=host -e BUILDKIT_REGISTRY_MIRROR_DIR=/root/.cache/registry --rm $(cat $iidfile)