Code Monkey home page Code Monkey logo

Comments (3)

nishanttotla avatar nishanttotla commented on July 28, 2024

cc @calavera @dongluochen

from engine-api.

calavera avatar calavera commented on July 28, 2024

I think the only reasonable way we've found to do this is by checking the version in the http request. I'm super open to suggestions, but I don't think there is any easy way to handle those. See what we do for docker inspect:

https://github.com/docker/docker/blob/master/daemon/inspect.go#L19-L27

Re p1v18: there was nothing defined to keep backward compatibility around before p1v19 😭

from engine-api.

nishanttotla avatar nishanttotla commented on July 28, 2024

Thanks @calavera.

For reference, here's how Engine does it by defining a separate function: https://github.com/docker/docker/blob/2658341b5fe9dec5c4839f0721219111fb08b43f/daemon/inspect_unix.go#L24

And then using a wrapper function: https://github.com/docker/docker/blob/2658341b5fe9dec5c4839f0721219111fb08b43f/daemon/inspect.go#L19

(Thanks to @tiborvass for pointing that out).

Also, a related issue is this, requiring to always specify API version: moby/moby#21157

(cc @thaJeztah)

from engine-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.