Skip to content

Comments

fix: detect image pull errors from Docker progress stream#24

Closed
liliwilson wants to merge 1 commit intomainfrom
fix/detect-image-pull-errors
Closed

fix: detect image pull errors from Docker progress stream#24
liliwilson wants to merge 1 commit intomainfrom
fix/detect-image-pull-errors

Conversation

@liliwilson
Copy link

Problem

When running a self-hosted worker, tasks fail with a confusing error:

Task launch failed: failed to create container: Error response from daemon: No such image: warpdotdev/dev-java:21

The image exists on Docker Hub, so the error is misleading.

Root Cause

pullImage discards the Docker pull progress stream with io.Copy(io.Discard, reader) and only checks for IO-level read errors. Docker's ImagePull API reports many pull failures — rate limits, auth errors, image-not-found for specific platforms — as JSON messages within the progress stream, not as the initial error return.

When one of these failures occurs, pullImage silently swallows the error, then ContainerCreate fails because the image was never actually pulled.

Fix

Decode each JSON message from the pull progress stream and check for the error field. If a pull error is detected, return it immediately with a clear message like:

failed to pull image warpdotdev/dev-java:21: <actual Docker error>

This surfaces the real failure (e.g., rate limiting, missing platform variant, auth issue) instead of the downstream "No such image" error.

This PR was generated with Warp.

Previously, pullImage discarded the Docker pull progress stream with
io.Discard and only checked for IO errors. Docker reports many pull
failures (rate limits, auth errors, image-not-found for specific
platforms) as JSON messages within the progress stream, not as the
initial error return. This caused silent pull failures followed by a
confusing 'No such image' error from ContainerCreate.

Now we decode each JSON message in the stream and surface any error
immediately with a clear message.

Co-Authored-By: Warp <agent@warp.dev>
@liliwilson
Copy link
Author

warpy eagerly made this PR

@liliwilson liliwilson closed this Feb 18, 2026
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