Skip to content

Commit

Permalink
Sandbox fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Mar 17, 2022
1 parent 438cf9f commit f335c37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/cache/cache.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}/
9 changes: 2 additions & 7 deletions .devcontainer/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f335c37

Please sign in to comment.