Hi everyone,
I’m running into a segmentation fault when trying to use a dev container with VS Code on an Ubuntu 22.04 base Docker image. I can run Docker containers via the terminal just fine, but when I try to start the VS Code server in the dev container, I get the following error:
Container server: Segmentation fault
[2161 ms] Error reading shell environment.
[2162 ms] Error: stream ended with:0 but wanted:9
…
[2203 ms] Segmentation fault
[2203 ms] Command failed: /root/.vscode-server/bin/code-server --log debug --force-disable-user-env --server-data-dir /root/.vscode-server --use-host-proxy --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /root/.vscode-server/data/Machine/.connection-token-cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba --extensions-download-dir /root/.vscode-server/extensionsCache --start-server --disable-websocket-compression --skip-requirements-check
[2203 ms] Segmentation fault
[2203 ms] Exit code 139
I’ve been using a very simple Dockerfile:
FROM ubuntu:22.04 as base
And a corresponding devcontainer.json
file:
{
“name”: “Existing Dockerfile”,
“build”: {
“context”: “…”,
“dockerfile”: “…/Dockerfile”
}
}
I tried to reinstall VS Code and its extensions, but the error persists. Docker seems to be working fine in other contexts. Has anyone faced a similar issue or has suggestions on what might be causing the segmentation fault? I’ve also tried running the Docker container manually, and everything works fine outside the dev container setup.
Thanks in advance!