Code Monkey home page Code Monkey logo

Comments (11)

rhuss avatar rhuss commented on May 29, 2024

Then an unfortunate Docker thing that you cant access older Docker daemons with newer client by default.

The quickest workaround ist to set DOCKER_API_VERSION:

 export DOCKER_API_VERSION=1.23

from minishift.

rhuss avatar rhuss commented on May 29, 2024

@jimmidyson maybe minishift docker-env could set this env var, too ?

from minishift.

rhuss avatar rhuss commented on May 29, 2024

FWIW, there is a direct corelation betwen API version number and Docker release number (which you can get from https://api.github.com/repos/boot2docker/boot2docker/releases when downloading the iso). Its not written in stone, but I think its safe to assume that the API version increases on the same footstep as the release numbe (i.e increasing the minor version number).

Here is the current mapping: https://docs.docker.com/engine/reference/api/docker_remote_api/

from minishift.

jimmidyson avatar jimmidyson commented on May 29, 2024

Is it safe to set that env var? Would there potentially be backwards compatibility issues? Would hope not but...

from minishift.

rhuss avatar rhuss commented on May 29, 2024

This variable works when using an older server with a new client and it instructs the client to use exactly this API level. Of course, it depends on the Docker CLI client whether it supports the 'old' API and of course newer API methods/parameters wont probably work. It would be nice if the client would degrade grafecully (saying sth 'this feature is not supported for this API level 'bla'), but not sure whether this is the case.

For basic operations (e.g. without using any Swarm functionality for Docker swarm 1.12) I guess it works correctly, but as it is only a guess, maybe its safer to not set it automatically (but document is somewhere).

from minishift.

rhuss avatar rhuss commented on May 29, 2024

Just tested a 1.12 client against 1.11 server -->

docker swarm init
No --secret provided. Generated random secret:
    8az4he1n4jdfodz9cl2l96e0m

Error response from daemon: 404 page not found

So not so gracefully ....

from minishift.

jimmidyson avatar jimmidyson commented on May 29, 2024

Not graceful, but not too worried about using newer functionality against older server version. More interested that what the server supports the client can handle correctly just by setting the client version env var. Seems to be the case

from minishift.

rhuss avatar rhuss commented on May 29, 2024

think, too, thats the case for >90% of the changes as from my experience there were only additions and no changes or removals of API methods, parameter keys, and return values keys. Would be interesting whether the client could cope with the rare cases which are really incompatible changes (so that it fallbacks to an old API client call when this env var is set to an older API).

from minishift.

jimmidyson avatar jimmidyson commented on May 29, 2024

Good way to discover the API version or just hard code it for now?

from minishift.

rhuss avatar rhuss commented on May 29, 2024

You can detect it live via <ip:port>/version but then you need already a running docker daemon.

Or you get the Docker version from boot2docker.iso's release file and then map this hardcoded to the API version by using the table in https://docs.docker.com/engine/reference/api/docker_remote_api/ (needs then to be updated for each Docker release).

from minishift.

jimmidyson avatar jimmidyson commented on May 29, 2024

Should be fixed now.

from minishift.

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.