-
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
Eclipse Docker Tooling support #7857
Comments
Can you possibly find the type of struct that Eclipse is trying to unmarshal into, and what version of the Docker API Eclipse was written to support? |
Link to java struct is available in description, but here again: https://github.com/dmandalidis/docker-client/blob/master/src/main/java/org/mandas/docker/client/messages/Image.java Version compatibility is described here: https://github.com/dmandalidis/docker-client#version-compatibility. It looks that they support latest version, that Podman also supports. |
Issues I notice: |
Yes, this was also comment from jwhonce in #7327
|
I am not sure how much bandwidth we are saving by omitting these fields. If tools have merged broken behaviour from the Docker API into their tools, then we will just have to deal with it. Bug for Bug compatibility. |
A friendly reminder that this issue had no activity for 30 days. |
Did we ever fix the I would check if that resolves things first, JSON should be tolerant of missing entries. |
To solve first problem in Eclipse
Second problem is solved with this patch (
Next problem is missing
Next patch is not needed in Eclipse plugin, but it fixes wrong value in
Next problem is images/search endpoint. Here how Docker API spec looks like: https://docs.docker.com/engine/api/v1.40/#operation/ImageSearch
The last problem I found before I stopped looking for others is wrong result when i try to create a container from GUI. Container is created, but it can not be started. A look with |
@mlegenovic Could you open these patches as a PR? |
BTW, IntelliJ docker plugin has the same problem, also there a container instance is created but cannot be started. I think relevant part is this:
but i'm not 100% sure. Here is how it looks like when i start the container with
There are also some other differences, but i'm not sure if they are relevant. It is very simple to reproduce the problem. |
@rhatdan Of course, i can do it. |
This comes back to our discussions around testcontainers - the Docker API never specifies that these fields are required, but it seems like Java implementations of JSON parsing are unable to handle omitting empty values? I don't really like doing this just for one language's quirks, but it seems like we may not have a choice. |
@mheon This is from Docker API spec: Size integer Required so, it is specified as required. I agree that these fields are not really required for a tool to work, but on the other side |
Sorry, my mistake, i meant |
/containers/create compat endpoint does not set the name correctly (containers#7857) Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
Docker compat API - /images/search returns wrong structure (#7857)
A friendly reminder that this issue had no activity for 30 days. |
@mlegenovic Has the situation improved on this in the main branch? |
@rhatdan Most things are already working, there is only a problem with the end-point to pull images. I just had no time to find out what exactly is the problem. What I saw is, docker sends progress information during the download, and podman not. Maybe this is the only problem. I need some time to analyze it. |
Great, I think there was some work on podman-remote build to send progress information, might be related. |
@rhatdan I have tested podman-remote, and it has the same behavior. I have found one endpoint which works with stream-writer: Just to demonstrate the difference: Podman:
Docker:
|
@jwhonce PTAL |
docker-client is a library written in Java and used in Eclipse to speak with Docker API. When endpoint /images/search is called, HTTP header attribute X-Registry-Auth has value "null". This is for sure wrong but Docker tolerates this value, and call works. With this patch call works also with Podman. containers#7857 Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
A friendly reminder that this issue had no activity for 30 days. |
@mlegenovic Where do we stand on this at this point? |
@rhatdan I have improved my go skills in the meantime, and could implement I have analyzed with debugger if podman even offers the possibility to provide such feedback. And I have found something (a channel), but due to lack of time not yet tried. Result will for sure not be identical to that what docker provides, but this is also not needed. I will try it when I have time, and if it works I will create a PR. Otherwise i will close this issue because a larger refactoring will be needed to offer similar functionality (not only in podman, but also in https://github.com/containers/image). I have seen some people have the same problem because they use products that use the same java docker client library. If I can solve it, multiple issues can be closed. |
@rhatdan It works, I was successful. Will create PR in the next few days. |
Awesome. |
Last known problem is fixed, so issue can be closed. |
Awesome, now if we could get Eclipse Podman tooling, to use enhanced podman features... |
Eclipse uses 3rd party library to integrate docker. Only GUI is implemented in Eclipse, everything else is 3rd party. I do not know if podman has such a library written in java (I know there is one for python). If not, then I think first step would be to write such a library, or to extend existing docker-based libraries to support native podman features. I don't know if there are issues in the eclipse project to support podman, but I have seen that Jetbrains user (Intellij) are asking for proper podman integration (including podman native features). Many people write there "podman is the future, please support podman", "kubernetes has dropped docker support, please support podman". So community interest is there. |
Awesome. Last time I wrote Java, was before the millennial. :^( |
Nice, I see that this issue has been closed and PRs merged to containers:master |
The 2.2.x branch of Podman is no longer being actively developed - we're working on 3.1 now, with 3.0 staying around for a while as a long-term support release |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Docker compatibility endpoint
/images/json
does not comply with the Docker API specification. Eclipse Docker plugin calls/images/json?all=true
and expects this structure: https://github.com/dmandalidis/docker-client/blob/master/src/main/java/org/mandas/docker/client/messages/Image.java. Podman returns a JSON like this:Deserialisation fails with following error message:
Steps to reproduce the issue:
Call /images/json?all=true
Compare result with expected response schema described here: https://docs.docker.com/engine/api/v1.40/#operation/ImageList
Podman does not return all required fields
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Eclipse 2020-09 (4.17) with Docker Tooling Plugin
The text was updated successfully, but these errors were encountered: