Skip to content

Commit 5b874f9

Browse files
gilesknapclaude
andcommitted
fix: Disable port auto-detection, forward 8000 explicitly
VS Code's auto-detection races with sphinx-autobuild on container restart and steals the port, breaking the live-reload docs preview. Disable it and forward 8000 explicitly so the docs URL is stable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ae1670a commit 5b874f9

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
"python.terminal.activateEnvironment": false,
3232
// Workaround to prevent garbled python REPL in the terminal
3333
// https://github.com/microsoft/vscode-python/issues/25505
34-
"python.terminal.shellIntegration.enabled": false
34+
"python.terminal.shellIntegration.enabled": false,
35+
// Only forward explicitly listed ports — auto-detection races with
36+
// sphinx-autobuild and steals the port on restart
37+
"remote.autoForwardPorts": false
3538
},
3639
// Add the IDs of extensions you want installed when the container is created.
3740
"extensions": [
@@ -45,7 +48,11 @@
4548
]
4649
}
4750
},
48-
// Create the config folder for the bash-config feature and uv cache
51+
// Explicitly forward sphinx-autobuild port (auto-detection disabled above)
52+
"forwardPorts": [
53+
8000
54+
],
55+
// Create host-side dirs needed for bind mounts before the container starts
4956
"initializeCommand": "mkdir -p ${localEnv:HOME}/.config/terminal-config",
5057
"runArgs": [
5158
// Allow the container to access the host X11 display and EPICS CA

0 commit comments

Comments
 (0)