Open dazza-codes opened 3 years ago
Can you provide the output from docker version
please?
Try to run this to simulate what the server version retrieval method does:
$ curl -s --unix-socket /var/run/docker.sock http://localhost/version | jq '.ApiVersion'
"1.41"
To avoid this automatic version retrieval, please set the API version to use when you instantiate the docker client.
$ curl -s --unix-socket /var/run/docker.sock http://localhost/version | jq '.ApiVersion'
"1.40"
$ docker version
Client: Docker Engine - Community
Version: 19.03.14
API version: 1.40
Go version: go1.13.15
Git commit: 5eb3275d40
Built: Tue Dec 1 19:20:17 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.14
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 5eb3275d40
Built: Tue Dec 1 19:18:45 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.9
GitCommit: ea765aba0d05254012b0b9e595e995c09186427f
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
From curl -s --unix-socket /var/run/docker.sock http://localhost/version | jq
:
{
"Platform": {
"Name": "Docker Engine - Community"
},
"Components": [
{
"Name": "Engine",
"Version": "19.03.14",
"Details": {
"ApiVersion": "1.40",
"Arch": "amd64",
"BuildTime": "2020-12-01T19:18:45.000000000+00:00",
"Experimental": "false",
"GitCommit": "5eb3275d40",
"GoVersion": "go1.13.15",
"KernelVersion": "4.15.0-126-generic",
"MinAPIVersion": "1.12",
"Os": "linux"
}
},
{
"Name": "containerd",
"Version": "1.3.9",
"Details": {
"GitCommit": "ea765aba0d05254012b0b9e595e995c09186427f"
}
},
{
"Name": "runc",
"Version": "1.0.0-rc10",
"Details": {
"GitCommit": "dc9208a3303feef5b3839f4323d9beb36df0a9dd"
}
},
{
"Name": "docker-init",
"Version": "0.18.0",
"Details": {
"GitCommit": "fec3683"
}
}
],
"Version": "19.03.14",
"ApiVersion": "1.40",
"MinAPIVersion": "1.12",
"GitCommit": "5eb3275d40",
"GoVersion": "go1.13.15",
"Os": "linux",
"Arch": "amd64",
"KernelVersion": "4.15.0-126-generic",
"BuildTime": "2020-12-01T19:18:45.000000000+00:00"
}
Having the same issue:
$ curl -s --unix-socket /var/run/docker.sock http://localhost/version | jq '.ApiVersion'
"1.41"
$ docker version
Client:
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
Go version: go1.16.4
Git commit: f0df350
Built: Wed Jun 2 11:56:22 2021
OS/Arch: darwin/amd64
Context: desktop-linux
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.7
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: b0f5bc3
Built: Wed Jun 2 11:54:58 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.6
GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d
runc:
Version: 1.0.0-rc95
GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
docker-init:
Version: 0.19.0
GitCommit: de40ad0
$ curl -s --unix-socket /var/run/docker.sock http://localhost/version | jq
{
"Platform": {
"Name": "Docker Engine - Community"
},
"Components": [
{
"Name": "Engine",
"Version": "20.10.7",
"Details": {
"ApiVersion": "1.41",
"Arch": "amd64",
"BuildTime": "2021-06-02T11:54:58.000000000+00:00",
"Experimental": "false",
"GitCommit": "b0f5bc3",
"GoVersion": "go1.13.15",
"KernelVersion": "5.10.25-linuxkit",
"MinAPIVersion": "1.12",
"Os": "linux"
}
},
{
"Name": "containerd",
"Version": "1.4.6",
"Details": {
"GitCommit": "d71fcd7d8303cbf684402823e425e9dd2e99285d"
}
},
{
"Name": "runc",
"Version": "1.0.0-rc95",
"Details": {
"GitCommit": "b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7"
}
},
{
"Name": "docker-init",
"Version": "0.19.0",
"Details": {
"GitCommit": "de40ad0"
}
}
],
"Version": "20.10.7",
"ApiVersion": "1.41",
"MinAPIVersion": "1.12",
"GitCommit": "b0f5bc3",
"GoVersion": "go1.13.15",
"Os": "linux",
"Arch": "amd64",
"KernelVersion": "5.10.25-linuxkit",
"BuildTime": "2021-06-02T11:54:58.000000000+00:00"
}
I'm having the same issue.
I noticed a change in the behavior of docker-py between version 4.2 and 4.3, caused by 727080b3cca846a28d5436bed861359c9742c7e1
Before this change, the client was created with an API version set to 1.35 by default. After this change, there's no more default, and the client retrieve this version from the docker daemon. So at this points the clients needs to talk to the docker daemon.
In practice, it means that prior to this change, a user that is NOT part of the docker group could still run docker.from_env()
successfully. After this change it's not possible anymore. If user doesn't have the permission to talk to the daemon, docker.from_env()
throw this exception:
Error: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
I wonder if it would be possible to get something a bit more precise than a DockerException in that case? I need to handle this case, and right now the only way is to look for `permission denied' in the error message, or something like that. It works, but matching bits of strings in an error message is usually not the right thing to do.
Thanks for these comments (and those in @tillahoffmann's linked issue), they helped my colleague get his local setup working. The trick was to enable this setting:
I have the same problem. Which App/GUI is it that the screenshot shows?
Thanks for these comments (and those in @tillahoffmann's linked issue), they helped my colleague get his local setup working. The trick was to enable this setting:
I had the same problem and had to activate the "Allow privileged port mapping" option in the advanced settings.
Could be a bug in 4.4.0 release?
versions