-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 API Compatibility. #8329
Comments
I think nomad has a driver for podman ? https://github.com/hashicorp/nomad-driver-podman |
It does yes, but at the moment it still uses the deprecated Varlink API and it also has a lot less features. They are working on updating to the new API (hashicorp/nomad-driver-podman#51). I should be able to use either driver though, and wanted to use the docker one for now because of it's expanded featureset. Hopefully in the future nomad-driver-podman will support additional podman specific features that the docker driver does not! |
I don't think the nomad driver has to worry about any of the remote APIs, varlink or the new REST one ? Unlike the https://www.nomadproject.io/docs/drivers/podman
|
In theory yes, but that's not the way they decided to implement it per these:
What I was saying is that there are two options currently implemented that should work right now: the docker driver (via Podman APIv2 docker compatibility), or the podman driver (via Podman varlink API, and soon via the native APIv2). |
Interesting, that means that libpod is not usable and it was easier to use the daemon (err, "systemd socket-activated service") More like a "podman-remote" driver Thanks for the links. I guess a third option would be to call the Too bad about the library approach. |
@jwhonce PTAL |
A friendly reminder that this issue had no activity for 30 days. |
@computator @afbjorklund Is this still an issue, lots of fixes have gone into the API. |
I'm not actually using Nomad with Podman, just wondered why "docker" API and not "podman" API... But I think it would be a good thing to support (running with Nomad), as an alternative to Docker Swarm. Seems like the nomad driver supports podman v2 now though: hashicorp/nomad-driver-podman#37 |
Ok reopen if this is currently broken. |
This issue is about API compatibility, not Nomad. Nomad just happens to be my usecase. If it doesn't match it will inevitably break other things as well. I haven't had a chance to check whether Podman's API fully follows the Docker API schema yet, but I'll check that out later today if I can. |
Great thanks. |
Yes there seems to still be a lot of minor schema differences. I repeated the process from my first post and created a diff between them. I will include a modified version of the diff that I have updated to remove expected differences, leaving only format differences or data differences that it looks like API consumers might depend on. I am sure there are additional schema differences beyond this depending on the container options or environment. This is also only a single endpoint and I expect there are probably differences on other endpoints too based on the differences in this one. A difference of particular note that may or may not be indicative of another issue is the Updated podman version:
|
Could you open another issue with these. Otherwise they will get lost. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
The podman compatibility API seems to have several formatting and compatibility issues vs the real docker API. I encountered issues myself running Podman under Nomad with the Docker API. This seems to have been fixed in the latest build according to #8235, likely because of #7860, but that still leaves some other issues I see when comparing the differences in API output manually.
I only compared the inspect container endpoint, but I expect that others have similar issues with how many I encountered here.
Steps to reproduce the issue:
Run a container on podman, then repeat the steps on docker:
podman|docker run -d --rm gcr.io/google_containers/pause-amd64:3.2
Inspect the created containers via the respective APIs (Using
jq
to format the JSON):curl -s --unix-socket /run/podman/podman.sock http://d/containers/{CONTAINER_ID}/json | jq .
curl -s --unix-socket /var/run/docker.sock http://d/containers/{CONTAINER_ID}/json | jq .
Describe the results you received:
Several fields were mismatched in syntax. A few I noticed:
"Created": "2020-11-12 22:26:13.620613454 +0000 UTC"
vs"Created": "2020-11-12T22:26:35.43720122Z"
(Fixed in aforementioned Docker Compatibility API Timestamp Format #7860)"Args": null
vs"Args": []
"Image": "gcr.io/google_containers/pause-amd64:3.2"
vs"Image": "sha256:80d28bedfe5dec59da9ebf8e6260224ac9008ab5c11dbbe16ee3ba3e4439ac2c"
(The image format inConfig.Image
matches though)"ExecIDs": []
vs"ExecIDs": null
(Swapped order vs Args above)Describe the results you expected:
I expected everything to match in syntax, and most things to match in value except for obvious differences such as host paths and container IDs. I expected everything to match the Docker API spec https://docs.docker.com/engine/api/v1.40/#operation/ContainerInspect
Output of
podman version
:Additional environment details (AWS, VirtualBox, physical, etc.):
Docker version info:
The text was updated successfully, but these errors were encountered: