Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misleading error generated by 404 from docker daemon #528

Closed
joeshaw opened this issue Jun 6, 2016 · 2 comments
Closed

misleading error generated by 404 from docker daemon #528

joeshaw opened this issue Jun 6, 2016 · 2 comments
Labels

Comments

@joeshaw
Copy link

joeshaw commented Jun 6, 2016

client.CreateContainer interprets any 404 from the server as a "no such image" error (ErrNoSuchImage), but there are other problems that can cause a 404 error.

One problem that I'm running into with the Docker for Mac beta is that the LogConfig inside the HostConfig points to a syslog unix socket in the container that does not exist: LogConfig:{Type:syslog Config:map[syslog-address:unix:///var/folders/r0/m8hpb98s4xj8z9q5vfd6f1w102j22s/T/plugin563018527]}

The error I get when trying to start the container from the API is API error (404): stat /var/folders/r0/m8hpb98s4xj8z9q5vfd6f1w102j22s/T/plugin563018527: no such file or directory but go-dockerclient is interpreting and returning ErrNoSuchImage which isn't right, and makes tracking down the real issue harder.

I wonder if rather than checking for a 404 error it'd be better to do explicit string matching.

@fsouza
Copy link
Owner

fsouza commented Jun 8, 2016

Hi @joeshaw, thanks for opening this issue. It used to be in the past the createContainer reported 404 only when the image didn't exist, and we didn't catch up with changes in Docker daemon.

@prateekgogia
Copy link

Seeing the same issue, when network name provided for create container call in opts is not found. Error returned is - "no such image". Actual error response body - "network failme not found".

@fsouza - I can submit a PR for this error fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants