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

Error response from daemon: client version 1.40 is too new #61

Closed
nikolaykuz opened this issue May 6, 2019 · 4 comments · Fixed by #63
Closed

Error response from daemon: client version 1.40 is too new #61

nikolaykuz opened this issue May 6, 2019 · 4 comments · Fixed by #63
Assignees

Comments

@nikolaykuz
Copy link

nikolaykuz commented May 6, 2019

I am using latest Docker for Mac 2.0.0.3, Engine: 18.09.2.

=== RUN   TestNginxLatestReturn
--- FAIL: TestNginxLatestReturn (0.01s)
    app_test.go:23: failed to create container: creating reaper failed: Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.39
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1739281]

goroutine 36 [running]:
testing.tRunner.func1(0xc000141900)
	/usr/local/Cellar/go/1.12/libexec/src/testing/testing.go:830 +0x388
panic(0x17fc540, 0x1fdf940)
	/usr/local/Cellar/go/1.12/libexec/src/runtime/panic.go:522 +0x1b5
@gianarb gianarb self-assigned this May 7, 2019
@gianarb gianarb added the bug label May 7, 2019
@gianarb
Copy link
Collaborator

gianarb commented May 7, 2019

Hello! I was able to reproduce this issue, thank you! A temporary workaround is to force the docker api version with the env var DOCKER_API_VERSION.

DOCKER_API_VERSION='1.39' go test ./...
ok      github.com/testcontainers/testcontainers-go     23.345s
?       github.com/testcontainers/testcontainers-go/wait        [no test files]

gianarb pushed a commit that referenced this issue May 7, 2019
The docker client can negotiate the right version of the API based on
the docker daemon but there is a specific function to call. We was not
calling it.

Now it should be smart enough to figure out which version of the API to
use.

Fixed #61

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
@bgabbasov-aurea
Copy link

bgabbasov-aurea commented Aug 7, 2019

I face same issue on windows using PowerShell. Setting DOCKER_API_VERSION variable does not help. Version 2.1.0.0 (36874) :(

@gianarb
Copy link
Collaborator

gianarb commented Aug 7, 2019

@bgabbasov-aurea what version of testcontainers are you using? This got fixed during the last release v0.0.4 commit 0416f14 thanks

@adampatterson
Copy link

I ran the same command three times with three different results.

docker exec -it container_name bash
Time Out

docker exec -it container_name bash
cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial tcp 54.191.67.44:2376: connect: operation timed out

docker exec -it container_name bash
Worked as expected 🤷‍♂️

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 a pull request may close this issue.

4 participants