fix: launching code-oss in docker containers (#183123)

This commit is contained in:
Robo 2023-05-23 00:15:52 +09:00 committed by GitHub
parent af8abe785d
commit f9480e290f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,6 +75,12 @@ if [ "$IN_WSL" == "true" ] && [ -z "$DISPLAY" ]; then
code-wsl "$@"
elif [ -f /mnt/wslg/versions.txt ]; then
code --disable-gpu "$@"
elif [ -f /.dockerenv ]; then
# Workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=1263267
# Chromium does not release shared memory when streaming scripts
# which might exhaust the available resources in the container environment
# leading to failed script loading.
code --disable-dev-shm-usage "$@"
else
code "$@"
fi