containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.91k stars 2.42k forks source link

docker version: Client and Engine missmatch #23011

Open bartoszgolebiowski opened 5 months ago

bartoszgolebiowski commented 5 months ago

Feature request description

I am using podman as an alternative for docker

I had a situation like this.

docker version
Client:
 Cloud integration: v1.0.29
 Version:           20.10.22
 API version:       **1.40**
 Go version:        go1.18.9
 Git commit:        3a2c30b
 Built:             Thu Dec 15 22:36:18 2022
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: linux/amd64/fedora-40
 Podman Engine:
  Version:          5.1.0
  APIVersion:       5.1.0
  Arch:             amd64
  BuildTime:        2024-05-29T02:00:00+02:00
  Experimental:     false
  GitCommit:
  GoVersion:        go1.22.3
  KernelVersion:    5.15.153.1-microsoft-standard-WSL2
  MinAPIVersion:    4.0.0
  Os:               linux
 Conmon:
  Version:          conmon version 2.1.10, commit:
  Package:          conmon-2.1.10-1.fc40.x86_64
 OCI Runtime (crun):
  Version:          crun version 1.15
commit: e6eacaf4034e84185fd8780ac9262bbf57082278
rundir: /run/user/1000/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  Package:          crun-1.15-1.fc40.x86_64
 Engine:
  Version:          5.1.0
  API version:      **1.41 (minimum version 1.24)**
  Go version:       go1.22.3
  Git commit:
  Built:            Wed May 29 02:00:00 2024
  OS/Arch:          linux/amd64
  Experimental:     false

Client.Api Version was different than Engine.Api Version Some functionalities that use docker under the hood do not work.

Suggest potential solution

In case of wasting time, maybe we can add additional logs with this information.

Have you considered any alternatives?

no

Additional context

no

bartoszgolebiowski commented 5 months ago

This additional log information can resolve some issues like this https://github.com/moby/moby/issues/37959 This bug is caused by a mismatch between the client and engine version.

Thanks for the amazing software, guys; you are amazing!

Luap99 commented 5 months ago

It is not clear what you are asking? If you use the docker client you control the API version of that client and podman cannot do anything about that. The podman API says it supports 1.41 API version as this is what we currently support and it should support older versions as well.

bartoszgolebiowski commented 5 months ago

@Luap99 to add some logs to covert that case

Luap99 commented 5 months ago

Add logs how and where? Using a older client against a newer server is normal and works fine, the server should return compatible output. If not it is a bug as long as the client is above the minimum version 1.24.

afbjorklund commented 5 months ago

Docker does not report that a newer API is available, it only reports if the API was downgraded.

Client: Docker Engine - Community
 Version:           26.1.4
 API version:       1.41 (downgraded from 1.45)
 ...

Server: ...
 Podman Engine:
  ...
 Engine:
  Version:          5.0.0
  API version:      1.41 (minimum version 1.24)
  ...
github-actions[bot] commented 4 months ago

A friendly reminder that this issue had no activity for 30 days.