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

Docker client version 1.22 is too old #15

Closed
dimkalinux opened this issue Jan 29, 2024 · 2 comments
Closed

Docker client version 1.22 is too old #15

dimkalinux opened this issue Jan 29, 2024 · 2 comments

Comments

@dimkalinux
Copy link
Contributor

In the code docker client version is hardcoded as 1.22

resp, err := client.Get("http://localhost/v1.22/containers/json")

In fresh Docker I have error "client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version" so sys-agent can not parse docker response

2024/01/29 20:36:56.955 [WARN] service request failed: docker docker:///var/run/docker.sock?containers=xxxxxxxxxxx: docker parsing failed: docker docker:///var/run/docker.sock?containers=xxxxxxxxxx: docker ummarshal failed: invalid character 'c' looking for beginning of value

docker version
Client: Docker Engine - Community
 Version:           25.0.1
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Tue Jan 23 23:10:32 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          25.0.1
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       71fa3ab
  Built:            Tue Jan 23 23:09:31 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.27
  GitCommit:        a1496014c916f9e62104b33d1bb5bd03b0858e59
 runc:
  Version:          1.1.11
  GitCommit:        v1.1.11-0-g4bccb38
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Maybe needed upgrade docker client version in request from 1.22 to 1.24 or make it configurable (not sure)?

Also maybe is good idea add checking for 404 error in docker request and not try to parse json in case of 404.

@umputun
Copy link
Owner

umputun commented Feb 1, 2024

It was merged in and released as a part of 1.4.0. Pls check it out and see if all good

@dimkalinux
Copy link
Contributor Author

Checked — works fine. Thanks!

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

No branches or pull requests

2 participants