You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a shim docker API service i.e., basically the service pretends to be docker and responds like docker. Requests are partially forwarded to docker engine and remainder (container or image related) are forwarded to a different container runtime.
The piece of software using this shim service uses go-dockerclient library.
Solution tried
I tried to return the version of docker API supported by the shim service as a response to GET /version request coming from the go-dockerclient lib.
The shim service responded by requesting the actual docker engine for response and replacing values for response.ApiVersion and response.MinAPIVersion with the supported version (1.41).
The solution did not work, can you please confirm if I am missing something, or if there is a better way of doing it
The text was updated successfully, but these errors were encountered:
kevintoormimik
changed the title
What would be the way to specify version of docker api so that go-dockerclient can adjust requests and response expectations accordingly?
What would be the best way to specify version of docker api, so that go-dockerclient can adjust requests and response expectations accordingly?
May 24, 2022
@fsouza I am not using the library directly, instead, another software Anax (open-horizon/anax) is using go-dockerclient. So interactions looks like this:
Docker Engine(calls are only forwarded if Shim does not want to respond directly) <-> Shim <-> Anax(software which is using go-dockerclient)
In this setup, is there a point in which go-dockerclient would send request to see what docker API version to use to interact with Docker Engine (in our case with Shim instead initially), so that Shim can interject can report its own supported docker API version?
OR
Whats the criteria used by go-dockerclient to decide which docker API version to use if NewVersionedClient is not used?
P.S. I accidentally closed the issue, so reopened.
Context
I am creating a shim docker API service i.e., basically the service pretends to be docker and responds like docker. Requests are partially forwarded to docker engine and remainder (container or image related) are forwarded to a different container runtime.
The piece of software using this shim service uses
go-dockerclient
library.Solution tried
I tried to return the version of docker API supported by the shim service as a response to
GET /version
request coming from thego-dockerclient
lib.The shim service responded by requesting the actual docker engine for response and replacing values for
response.ApiVersion
andresponse.MinAPIVersion
with the supported version (1.41
).The solution did not work, can you please confirm if I am missing something, or if there is a better way of doing it
@playground
The text was updated successfully, but these errors were encountered: