From f335c374f82dde155fbfa98e95c2215bc75589b1 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Thu, 17 Mar 2022 00:29:14 +0000 Subject: [PATCH] Sandbox fixes --- .devcontainer/cache/cache.Dockerfile | 4 +++- .devcontainer/prepare.sh | 9 ++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.devcontainer/cache/cache.Dockerfile b/.devcontainer/cache/cache.Dockerfile index 480019b1617..217122a4e9b 100644 --- a/.devcontainer/cache/cache.Dockerfile +++ b/.devcontainer/cache/cache.Dockerfile @@ -18,5 +18,7 @@ RUN mkdir -p ${CACHE_FOLDER} && chown ${USERNAME} ${CACHE_FOLDER} /repo-source-t FROM mcr.microsoft.com/vscode/devcontainers/repos/microsoft/vscode:dev as dev-container ARG USERNAME=node ARG CACHE_FOLDER="/home/${USERNAME}/.devcontainer-cache" -RUN mkdir -p "${CACHE_FOLDER}" && chown "${USERNAME}:${USERNAME}" "${CACHE_FOLDER}" +RUN mkdir -p "${CACHE_FOLDER}" \ + && chown "${USERNAME}:${USERNAME}" "${CACHE_FOLDER}" \ + && su ${USERNAME} -c "git config --global codespaces-theme.hide-status 1" COPY --from=cache ${CACHE_FOLDER}/cache.tar ${CACHE_FOLDER}/ diff --git a/.devcontainer/prepare.sh b/.devcontainer/prepare.sh index ee7e79f5bbf..d6f1578c3dd 100755 --- a/.devcontainer/prepare.sh +++ b/.devcontainer/prepare.sh @@ -5,13 +5,8 @@ # running commands like "yarn install" from the ground up. Developers (and should) still run these commands # after the actual dev container is created, but only differences will be processed. -# Fix permissions for chrome sandboxing -mkdir -p .build/electron/chrome-sandbox -chmod 4755 .build/electron/chrome-sandbox -chown root .build/electron/chrome-sandbox - yarn install yarn electron -# Improve command line lag by disabling git portion of theme -git config --global codespaces-theme.hide-status 1 +sudo chown root .build/electron/chrome-sandbox +sudo chmod 4755 .build/electron/chrome-sandbox