You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
openshell sandbox create --from <Dockerfile> fails with timeout when the resulting image is large (e.g., 2.5 GB). #485
Issue: openshell sandbox create --from fails with timeout when the resulting image is large (e.g., 2.5 GB).
Root Cause
The upload timeout is fixed at 120 seconds — the bollard library's default for Docker::connect_with_local_defaults(). This timeout applies to the entire HTTP PUT
request that uploads the image tar into the gateway container.
For a 2.5 GB image, even over a local Unix socket, the gateway container needs to receive the data and write it to its overlay filesystem. On a loaded system or slow
storage, 120 seconds is not enough.
crates/openshell-bootstrap/src/lib.rs:472 — OPENSHELL_PUSH_IMAGES dev workflow: pushes pre-built images into gateway
By contrast, the SSH Docker client in docker.rs:250 already uses a 600-second timeout, indicating the upload timeout problem was known for the remote case but the
local case was overlooked.
Proposed Fix
Bollard 0.20 provides Docker::connect_with_defaults() which auto-detects DOCKER_HOST and supports a .with_timeout() builder. Replace connect_with_local_defaults()
with this at both callsites. No new helpers needed.
build.rs:50:
// Before
let local_docker = Docker::connect_with_local_defaults()
.into_diagnostic()
.wrap_err("failed to connect to local Docker daemon")?;
// After
let local_docker = Docker::connect_with_defaults()
.into_diagnostic()
.wrap_err("failed to connect to local Docker daemon")?
.with_timeout(std::time::Duration::from_secs(3600));
lib.rs:472:
// Before
let local_docker = Docker::connect_with_local_defaults().into_diagnostic()?;
// After
let local_docker = Docker::connect_with_defaults()
.into_diagnostic()?
.with_timeout(std::time::Duration::from_secs(3600));
Side benefit: connect_with_defaults() also correctly respects DOCKER_HOST for unix://, tcp://, and http:// schemes, which connect_with_local_defaults() silently
ignores.
Scope: 2 files, ~6 lines changed. No API surface changes. No protocol changes. Backwards compatible.
Issue: openshell sandbox create --from fails with timeout when the resulting image is large (e.g., 2.5 GB).
It seems the the upload timeout is fixed at 120 seconds, the bollard library's default for Docker::connect_with_local_defaults(). This timeout applies to the entire HTTP PUT request that uploads the image tar into the gateway container.
Closing this for now. As part of #873 we'll be moving off the local k3s implementation and onto podman/docker/microvm based sandboxes. These sandboxes should be more reliable and address this class of bug. Please feel free to move any discussion there.
Activity
drew commentedon Apr 18, 2026
Closing this for now. As part of #873 we'll be moving off the local k3s implementation and onto podman/docker/microvm based sandboxes. These sandboxes should be more reliable and address this class of bug. Please feel free to move any discussion there.