Docker 4.6 for mac improves -v mount performance enough that we should

use it instead of a bind mount (if virtio is enabled)
pull/1132/head
Jesse Vincent 3 years ago
parent 7a2436f80b
commit 84f0b3307f
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -51,10 +51,10 @@ tar -cf "${XFER_DIR}/kaleidoscope.tar" \
fi fi
if [ -z "$DOCKER_LIVE_KALEIDOSCOPE_DIR" ]; then if [ -z "$DOCKER_LIVE_KALEIDOSCOPE_DIR" ]; then
_KALEIDOSCOPE_MOUNT="type=tmpfs,destination=/kaleidoscope:exec" _KALEIDOSCOPE_MOUNT="--mount type=tmpfs,destination=/kaleidoscope:exec"
else else
echo "Kaleidoscope is mounted read/write inside docker" echo "Kaleidoscope is mounted read/write inside docker"
_KALEIDOSCOPE_MOUNT="type=bind,source=$(pwd),destination=/kaleidoscope,consistency=cached" _KALEIDOSCOPE_MOUNT="-v $(pwd):/kaleidoscope:"
fi fi
@ -63,7 +63,7 @@ docker build -q -t kaleidoscope/docker etc
# We do want word splitting since there are multiple options here # We do want word splitting since there are multiple options here
# shellcheck disable=SC2086 # shellcheck disable=SC2086
docker run --rm $DOCKER_RUN_INTERACTIVE_OPTS \ docker run --rm $DOCKER_RUN_INTERACTIVE_OPTS \
--mount ${_KALEIDOSCOPE_MOUNT} \ ${_KALEIDOSCOPE_MOUNT} \
--mount type=bind,source="${XFER_DIR}",destination=/kaleidoscope-src,consistency=delegated,readonly \ --mount type=bind,source="${XFER_DIR}",destination=/kaleidoscope-src,consistency=delegated,readonly \
--mount type=volume,source=kaleidoscope-persist,destination=/kaleidoscope-persist,consistency=delegated \ --mount type=volume,source=kaleidoscope-persist,destination=/kaleidoscope-persist,consistency=delegated \
--mount type=volume,source=kaleidoscope-googletest-build,destination=/kaleidoscope/testing/googletest/build,consistency=delegated \ --mount type=volume,source=kaleidoscope-googletest-build,destination=/kaleidoscope/testing/googletest/build,consistency=delegated \

Loading…
Cancel
Save