From 70ae8dd259528ed6324616cd4de869e1e3710ab4 Mon Sep 17 00:00:00 2001 From: Ezri Zhu Date: Fri, 16 Feb 2024 18:21:18 +0000 Subject: [PATCH] docker support --- try | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/try b/try index 979118d0..fe645efa 100755 --- a/try +++ b/try @@ -47,6 +47,13 @@ try() { ## Make any directories that don't already exist, this is OK to do here ## because we have already checked if it valid. export SANDBOX_DIR + + # If we're in a docker container, we want to mount tmpfs on sandbox_dir, #136 + if [ -f /.dockerenv ] && [ "$(id -u)" -eq "0" ] + then + mount -t tmpfs tmpfs "$SANDBOX_DIR" + fi + mkdir -p "$SANDBOX_DIR/upperdir" "$SANDBOX_DIR/workdir" "$SANDBOX_DIR/temproot" ## Find all the directories and mounts that need to be mounted