Give the sbx CLI its cache and state paths in the drukbox containers - #750
Merged
Merged
Conversation
The gateway tunnel runs `sbx ssh proxy`. It reads the feature flags from the sbx cache and dials the daemon socket through XDG_STATE_HOME, so without them the tunnel sees the SSH endpoint as off. The overlay now mounts the sbx cache and the directory of the daemon socket, and sets XDG_CACHE_HOME and XDG_STATE_HOME. A directory mount keeps the new socket after a daemon restart. install.sh creates the cache directory with the deploy user's owner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The drukbox gateway tunnel runs
sbx ssh proxyin the gateway container. The container has no home directory for the deploy uid. Then sbx finds no feature flags, sees the daemon's SSH endpoint as off, and the tunnel fails with "the sandboxd SSH endpoint is disabled".Changes in the
x-sbx-rigandx-sbx-envanchors ofdeploy/compose.docker-sbx.yaml, so every drukbox service gets them:.cache/sandboxes, where sbx keeps its feature flags.XDG_CACHE_HOMEandXDG_STATE_HOMEpoint the CLI to the mounts.sbx ssh proxyfinds the socket throughXDG_STATE_HOMEonly.DOCKER_SANDBOXES_APInow names the socket inside the mounted directory, for the other commands.install.shcreates.cache/sandboxeswith the deploy user's owner, as it does for.config/sandboxes. Docker would create a missing bind source as root.The mounts match the container recipe in czpython/drukbox#62. Refs czpython/drukbox#61.