Giter Club home page Giter Club logo

Comments (6)

se7entyse7en avatar se7entyse7en commented on August 16, 2024

Docker version is lower than we require

Do we want to asses the minimum version we require and check for that hardcoded value or do we want to also add some kind of testing may be by forcing a different docker api version?

from engine-deprecated.

se7entyse7en avatar se7entyse7en commented on August 16, 2024

I actually tried replacing all occurrences in docker.go of client.NewClientWithOpts(client.WithVersion("1.18")) just to give it a try and the integration tests passed. 1.18 is the oldest one listed here.

from engine-deprecated.

smacker avatar smacker commented on August 16, 2024

moby lib already checks API version and returns an error if docker server is too old.
I saw it with my docker when updated the lib to master. (v1.40)
I'm not sure what client.WithVersion does and did you test it correctly or not but consistency mode was introduced after 1.18 for sure and we rely on it.

from engine-deprecated.

se7entyse7en avatar se7entyse7en commented on August 16, 2024

moby lib already checks API version and returns an error if docker server is too old.

Great! didn't know that.

but consistency mode was introduced after 1.18 for sure and we rely on it.

I was thinking the same thing, and I guess that it becomes a noop, but I'm investigating it further. 👍

from engine-deprecated.

se7entyse7en avatar se7entyse7en commented on August 16, 2024

@smacker I've just tried to change with client.NewClientWithOpts(client.WithVersion("1.11")) and all the tests fail with:

Error response from daemon: client version 1.11 is too old. Minimum supported API version is 1.12, please upgrade your client to a newer version.

So this means that client.WithVerson actually works.

This also mean that all the newer features simply becomes noop. I manually tried a sample query (Top languages by repository count) with api version 1.12 and 1.38. It works with both version, but with 1.12 it took ~9s and with 1.38 it took ~1.5s.

By running docker version on my local machine the output is:

Screenshot 2019-04-09 at 10 25 59

So it seems that from the minimum version everything works, but it may not work as good as expected. This is aligned to what is stated in the documentation:

A new version of the API is released when new features are added. The Docker API is backward-compatible, so you do not need to update code that uses the API unless you need to take advantage of new features.

Hence I see two options:

  1. we just require that everything simply works, so we could just eventually wrap the docker error message,
  2. we choose a minimum version that we know it makes Engines works as we expect. In our case it could be 1.28 which is the first version with support to mount consistency.

from engine-deprecated.

se7entyse7en avatar se7entyse7en commented on August 16, 2024

As discussed here, we assume that the user is running the latest version of Docker and just let the SDK check for API incompatibility. We check then for:

  • Docker present and running,
  • Docker Toolbox instead of Docker Desktop.

from engine-deprecated.

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.