From 823be5a1f8f813a0e2950b649209fe23e88273a0 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 1 Jun 2021 20:56:30 +0000 Subject: [PATCH] chore: clean up bind mount --- devenv.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devenv.sh b/devenv.sh index 40f156e..f6ea1f5 100755 --- a/devenv.sh +++ b/devenv.sh @@ -90,11 +90,15 @@ envsetup() { # Run the sledge-dev:latest image as a background container named sledge-dev with the project directly mounted at /sledge echo "Creating the build container ${SYS_DOC_NAMETAG} from the image ${SYS_DOC_DEVNAMETAG}" + + host_dir="$(cd "$(dirname "${0}")" && pwd -P || exit 1)" + echo "Bind mounting $host_dir at $HOST_SYS_MOUNT" + docker run \ --privileged \ --name=${SYS_DOC_DEVNAME} \ --detach \ - --mount type=bind,src="$(cd "$(dirname "${0}")" && pwd -P || exit 1),target=/${SYS_NAME}" \ + --mount type=bind,source="$host_dir",target="$HOST_SYS_MOUNT" \ "${SYS_DOC_DEVNAMETAG}" /bin/sleep 99999999 > /dev/null # Execute the make install command on the sledge-dev image to build the project