Skip to content

Commit 91d2f2d

Browse files
authored
Merge pull request moby#2349 from tonistiigi/shell-workdir
hack: allow mounting in workdir in shell
2 parents ea773f6 + 9c67257 commit 91d2f2d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

hack/shell

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,11 @@ SSH=
1414
if [ -n "$MOUNT_SSH_AUTH_SOCK" ]; then
1515
SSH="-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK -e SSH_AUTH_SOCK"
1616
fi
17-
docker run $SSH -it --privileged -v /tmp --net=host -e BUILDKIT_REGISTRY_MIRROR_DIR=/root/.cache/registry --rm $(cat $iidfile)
17+
18+
volumes=
19+
if [ -n "$MOUNT_BUILDKIT_SOURCE" ]; then
20+
volumes="-v $(pwd):/src"
21+
fi
22+
23+
set -x
24+
docker run $SSH $volumes -it --privileged -v /tmp --net=host -e BUILDKIT_REGISTRY_MIRROR_DIR=/root/.cache/registry --rm $(cat $iidfile)

0 commit comments

Comments
 (0)