Skip to content

Commit 46ce119

Browse files
fix: add --no-sandbox wrappers for Chrome and OpenCode Desktop in Docker
Chrome and OpenCode Desktop (Electron) crash in Docker containers because the setuid/namespace sandbox fails even in privileged containers. Add wrappers with --no-sandbox for both, following the same pattern already used for GitHub Desktop, Claude Desktop and VS Code. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e39c2d9 commit 46ce119

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Docker-Images/Developer/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,28 @@ SHWRAP
202202
TARGET_BIN=/usr/lib/github-desktop/github-desktop EXTRA_FLAGS="--password-store=basic" wrap /usr/bin/github-desktop /usr/lib/github-desktop/github-desktop
203203
TARGET_BIN=/usr/share/claude-desktop/claude-desktop EXTRA_FLAGS="--disable-gpu" wrap /usr/bin/claude-desktop /usr/share/claude-desktop/claude-desktop
204204
TARGET_BIN=/usr/share/code/bin/code EXTRA_FLAGS="" wrap /usr/bin/code /usr/share/code/bin/code
205+
# Google Chrome (no es Electron pero también necesita --no-sandbox en Docker)
206+
if [ -x /opt/google/chrome/google-chrome ]; then
207+
mv /usr/bin/google-chrome-stable /usr/bin/google-chrome-stable.real 2>/dev/null || true
208+
cat > /usr/bin/google-chrome-stable <<'GCWRAP'
209+
#!/bin/sh
210+
exec /opt/google/chrome/google-chrome --no-sandbox --disable-gpu-sandbox --disable-setuid-sandbox "$@"
211+
GCWRAP
212+
chmod +x /usr/bin/google-chrome-stable
213+
ln -sf google-chrome-stable /usr/bin/google-chrome 2>/dev/null || true
214+
fi
215+
# OpenCode Desktop (Electron) - descubrir el binario real del paquete .deb
216+
_oc_real=""
217+
for _try in \
218+
/usr/share/opencode-desktop/opencode-desktop \
219+
/usr/lib/opencode-desktop/opencode-desktop \
220+
/usr/share/opencode/opencode \
221+
/usr/lib/opencode/opencode; do
222+
if [ -x "$_try" ]; then _oc_real="$_try"; break; fi
223+
done
224+
if [ -n "$_oc_real" ] && [ -x /usr/bin/opencode-desktop ]; then
225+
TARGET_BIN="$_oc_real" EXTRA_FLAGS="--disable-gpu" wrap /usr/bin/opencode-desktop "$_oc_real"
226+
fi
205227
EOSH
206228

207229
# Extensiones VS Code preinstaladas para escritorio/remoto

0 commit comments

Comments
 (0)