Skip to content

fix(#54): talk to docker-socket-proxy's exposed socket, not the raw host one - #3

Merged
man4ish merged 1 commit into
mainfrom
fix/54-docker-socket-proxy-redirect
Aug 28, 2026
Merged

fix(#54): talk to docker-socket-proxy's exposed socket, not the raw host one#3
man4ish merged 1 commit into
mainfrom
fix/54-docker-socket-proxy-redirect

Conversation

@man4ish

@man4ish man4ish commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

fix(#54): talk to docker-socket-proxy's exposed socket, not the raw host one

omnibioai-studio's docker-compose*.yml no longer mounts /var/run/docker.sock
into this service directly (companion #54 PR) -- it mounts the
docker-proxy-socket named volume at /var/run/proxy-socket instead, the
same policy-enforcing proxy already in front of workbench's own socket
access since #265.

dockerRequest() hardcoded socketPath: '/var/run/docker.sock' with no
DOCKER_HOST-style environment indirection to redirect through (this is a
raw Node http.request over a Unix socket, not the docker CLI or SDK).
Added a DOCKER_SOCKET_PATH env var, defaulting to the proxy's own path so
this keeps working even if the var is unset somewhere this service runs
outside that compose file.

This service's real docker.sock usage is exactly three calls on three
fixed, hardcoded container names (omnibioai-jupyter/-rstudio/-vscode):
GET .../json, POST .../start, POST .../stop -- never /containers/create,
so no docker-socket-proxy allowlist changes were needed on its side.

Testing: src/server.test.js, all 4 tests passing (mocked at the http
module level; none assert on the literal socketPath value).

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01CBywKuCSWEuBHMv7DPAUCE

…ost one

omnibioai-studio's docker-compose*.yml no longer mounts /var/run/docker.sock
into this service directly (companion #54 PR) -- it mounts the
docker-proxy-socket named volume at /var/run/proxy-socket instead, the
same policy-enforcing proxy already in front of workbench's own socket
access since #265.

dockerRequest() hardcoded socketPath: '/var/run/docker.sock' with no
DOCKER_HOST-style environment indirection to redirect through (this is a
raw Node http.request over a Unix socket, not the docker CLI or SDK).
Added a DOCKER_SOCKET_PATH env var, defaulting to the proxy's own path so
this keeps working even if the var is unset somewhere this service runs
outside that compose file.

This service's real docker.sock usage is exactly three calls on three
fixed, hardcoded container names (omnibioai-jupyter/-rstudio/-vscode):
GET .../json, POST .../start, POST .../stop -- never /containers/create,
so no docker-socket-proxy allowlist changes were needed on its side.

Testing: src/server.test.js, all 4 tests passing (mocked at the http
module level; none assert on the literal socketPath value).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CBywKuCSWEuBHMv7DPAUCE
@man4ish
man4ish merged commit bb0c921 into main Aug 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant