Skip to content

Commit f9480e2

Browse files
authored
fix: launching code-oss in docker containers (microsoft#183123)
1 parent af8abe7 commit f9480e2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/code.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ if [ "$IN_WSL" == "true" ] && [ -z "$DISPLAY" ]; then
7575
code-wsl "$@"
7676
elif [ -f /mnt/wslg/versions.txt ]; then
7777
code --disable-gpu "$@"
78+
elif [ -f /.dockerenv ]; then
79+
# Workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=1263267
80+
# Chromium does not release shared memory when streaming scripts
81+
# which might exhaust the available resources in the container environment
82+
# leading to failed script loading.
83+
code --disable-dev-shm-usage "$@"
7884
else
7985
code "$@"
8086
fi

0 commit comments

Comments
 (0)