The gateway's loopback tunnel (#57) runs sbx ssh proxy inside the gateway container. The container runs with HOME=/, and then the tunnel fails:
error: the sandboxd SSH endpoint is disabled; restart sandboxd after enabling it
The daemon has SSH on: sbx ssh proxy on the host works, and the daemon log says ssh server ready. The container's sbx client fails for two reasons:
- sbx reads its feature flags from
$XDG_CACHE_HOME/sandboxes (unleash-toggles-production.json). With HOME=/ it finds none, so it treats feature.ssh as off and never calls the daemon.
sbx ssh proxy dials the daemon socket under $XDG_STATE_HOME/sandboxes/sandboxes/sandboxd/sandboxd.sock. It ignores DOCKER_SANDBOXES_API.
This happens with sbx 0.39.0 and 0.45.1 on Linux. On macOS, sbx keeps its cache in ~/Library/Caches/com.docker.sandboxes and ignores XDG_CACHE_HOME, so macOS does not show the failure.
It works when the gateway gets:
environment:
XDG_CACHE_HOME: ${DRUKS_SBX_HOME}/.cache
XDG_STATE_HOME: ${DRUKS_SBX_HOME}/.local/state
volumes:
- ${DRUKS_SBX_HOME}/.cache/sandboxes:${DRUKS_SBX_HOME}/.cache/sandboxes
- ${DRUKS_SBX_HOME}/.local/state/sandboxes/sandboxes/sandboxd/sandboxd.sock:${DRUKS_SBX_HOME}/.local/state/sandboxes/sandboxes/sandboxd/sandboxd.sock
Also: the socket is mounted as a file
The compose file mounts sandboxd.sock as one file. A daemon restart, such as an sbx upgrade or a settings change that needs a restart, makes a new socket. The containers keep the old one and cannot reach the daemon until they are recreated.
Expected
In drukbox (#62):
diagnose reports when sbx ssh proxy cannot reach the SSH endpoint. It requires the daemon's SSH banner from a probe that selects no sandbox.
- The container recipe in
docs/deploy.md mounts the directory of the daemon socket, not the socket file. It sets XDG_CACHE_HOME and XDG_STATE_HOME, and it mounts the sbx cache. The gateway container needs the same mounts and variables.
In the deployment's compose file:
- The drukbox services get the sbx cache and state paths, as the recipe shows.
- The compose file mounts the directory of the daemon socket, not the socket file, so a daemon restart does not cut the containers off.
- On the deploy host,
sbx ssh proxy from the gateway container prints an SSH banner, also after a daemon restart without a container restart.
The gateway's loopback tunnel (#57) runs
sbx ssh proxyinside the gateway container. The container runs withHOME=/, and then the tunnel fails:The daemon has SSH on:
sbx ssh proxyon the host works, and the daemon log saysssh server ready. The container's sbx client fails for two reasons:$XDG_CACHE_HOME/sandboxes(unleash-toggles-production.json). WithHOME=/it finds none, so it treatsfeature.sshas off and never calls the daemon.sbx ssh proxydials the daemon socket under$XDG_STATE_HOME/sandboxes/sandboxes/sandboxd/sandboxd.sock. It ignoresDOCKER_SANDBOXES_API.This happens with sbx 0.39.0 and 0.45.1 on Linux. On macOS, sbx keeps its cache in
~/Library/Caches/com.docker.sandboxesand ignoresXDG_CACHE_HOME, so macOS does not show the failure.It works when the gateway gets:
Also: the socket is mounted as a file
The compose file mounts
sandboxd.sockas one file. A daemon restart, such as an sbx upgrade or a settings change that needs a restart, makes a new socket. The containers keep the old one and cannot reach the daemon until they are recreated.Expected
In drukbox (#62):
diagnosereports whensbx ssh proxycannot reach the SSH endpoint. It requires the daemon's SSH banner from a probe that selects no sandbox.docs/deploy.mdmounts the directory of the daemon socket, not the socket file. It setsXDG_CACHE_HOMEandXDG_STATE_HOME, and it mounts the sbx cache. The gateway container needs the same mounts and variables.In the deployment's compose file:
sbx ssh proxyfrom the gateway container prints an SSH banner, also after a daemon restart without a container restart.