Skip to content
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

Does not work OOTB with Docker Engine 25 anymore #14

Open
moschlar opened this issue Jan 22, 2024 · 1 comment
Open

Does not work OOTB with Docker Engine 25 anymore #14

moschlar opened this issue Jan 22, 2024 · 1 comment

Comments

@moschlar
Copy link

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061288

Docker Engine v25 (not yet natively packaged as docker.io, I know - but docker-ce from their repo is) deprecates legacy API versions:
https://docs.docker.com/engine/deprecated/#deprecate-legacy-api-versions

This affects libnss-docker, because it has API version 1.21 (set at configure time).

A workaround until Docker Engine v26 would be to set DOCKER_MIN_API_VERSION=1.21 for the Docker Daemon, but after that, a minimum of 1.24 is required.

@petski
Copy link

petski commented Jan 24, 2024

You can simulate libnss-docker by doing this:

$ curl --silent --unix-socket /var/run/docker.sock 'http://foo/v1.21/containers/my_app/json'
client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version

This is what Docker Engine 25 will return to you. In earlier versions, you'll see the JSON output that libnss-docker "parses" to get it's information.

To work around the fact that API version 1.21 isn't available in Docker Engine 25, and let libnss-docker use another version of the API to get it's information, you can build nss-docker like so:

./configure --with-docker-api-version=1.40

In this example I picked version 1.40 as it's supported in Docker Engine 19.03, and further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants