ContainerDeskDocs
Hosts & SSHView source ↗

🔐 Remote Docker capabilities and target identity

Settings → selected SSH alias → Connect now performs real bounded remote Docker checks after strict SSH authentication and owned master setup. Blank Docker path uses the remote noninteractive docker PATH; an optional absolute executable path handles installations outside it. Blank context uses the effective remote user’s current Docker selection, including Docker’s environment/config resolution. An explicit named context is passed as a global option. No context is created, switched or modified by the application.

The optional sudo checkbox chooses the fixed sudo -n -- <docker> ... prefix for every capability and later prepared command. It uses the administrator’s existing Docker configuration and sudo policy; it never falls back to another privilege mode, asks for a password or changes permissions. Probe commands remain reads. This option does not enable management or terminal permission.

The probe executes fixed context inspect, version and info commands with JSON templates that select only name/endpoint, client/server versions, daemon ID, OS and security-option names. It recognizes rootless from the daemon’s reported security options, not from a socket pathname; missing security information stays unknown. Compose discovery first uses compose version without plugin-specific options (the output is not parsed), then asks a present plugin for JSON version output. A missing Compose plugin leaves ordinary Docker reads available. Broken/unsupported plugin replies may be unknown or a bounded probe failure; no plugin is installed by the application.

Each command has a five-second deadline, 16 KiB stdout and 16 KiB stderr limits. The complete sequence has a 30-second deadline, including optional Compose JSON. Commands run through the same private SSH connection, using the centralized POSIX encoder. A timeout or oversized response cancels and reaps its local child. Remote read commands are not retried. IPC exposes a finite diagnostic enum and validated bounded display fields; it never carries raw stderr, TLS material, registry configuration or credentials.

The UI shows the actual context, endpoint type/address, daemon ID, versions, OS, rootless status, Compose status and execution mode. Supported endpoint forms are Unix sockets, TCP endpoints and SSH context endpoints without passwords/query parameters; credential-bearing or unsupported forms are rejected before display/use. Unix means a socket on the SSH host. TCP/SSH means the remote Docker CLI may address another machine. Docker’s existing context TLS/config is honored; ContainerDesk neither exposes a Docker TCP listener nor automatically bypasses verification. Linux is required from daemon info before readiness. A Unix socket alone is not proof of Linux or rootless operation.

After the first context inspection, the builder pins the resolved name. The special dynamic default endpoint is pinned with --host, preserving its observed DOCKER_HOST/socket choice and existing TLS environment. Named contexts retain --context to preserve their certificate/config resolution. A final context inspection rejects endpoint drift during setup. No context use or implicit sudo/context switch occurs. Changing Docker options, even for the same SSH alias, invalidates the prior connection generation.

VerifiedDocker stores the backend-only command configuration and daemon/endpoint binding. Its preparation method requires a fresh matching report; mismatched daemon, context, endpoint or sudo mode returns stale-session. All existing read, mutation and terminal builders share the same global-option construction. Read, mutation and terminal dispatchers obtain fresh identity observations, enforce backend authorization and use this binding before dispatch. A connect-time probe is not a perpetual guarantee against external daemon/context changes; no remote atomic config lock is claimed.

The selected connection becomes ready only after the native probe accepts Linux and a daemon identity. Failed capability checks remain degraded with a useful static diagnosis (missing Docker, inaccessible/stopped daemon, missing context, sudo authentication, invalid output or transport failure). No Docker resource SessionScope or mutation permission is fabricated by this diagnostic connection panel. Use the saved-host flow in the user guide for scoped resource views.

Verification separates real CLI behavior from server fixtures: the disposable SSH lab runs the actual remote Docker CLI against private synthetic Unix API listeners, a denied socket and an absent socket. It verifies formatting, context precedence, rootless response parsing, Compose absence, sudo rejection, unsupported OS, response/timeout bounds and full native ProxyJump state progression. That synthetic API is explicitly not Docker Engine and never accesses the host daemon socket. This original probe evidence is supplemented by the actual 049 dedicated Docker Engine lab and 046 native GUI checkpoint. Mac app/DMG launch evidence is in 054; full remote Mac operations remain a separate 058 gate.

Sources: Docker context inspection, CLI options and environment, Docker CLI endpoint resolution, JSON version output, daemon info, Compose version formats.