Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

Package docker-py versus docker, what to do in the future? #274

Open
misolietavec opened this issue Apr 21, 2017 · 1 comment
Open

Package docker-py versus docker, what to do in the future? #274

misolietavec opened this issue Apr 21, 2017 · 1 comment

Comments

@misolietavec
Copy link

In this repository, we use docker-py (in requirements.txt, or in Dockerfile-alpine). This is older package, last version 1.10.6 on pypi is from 2016-11-02. The newer package is called docker (newest ver. 2.2.1 from 2017-03-28). Besides the ambiguous name, docker package is incompatible with docker-py.

I cannot find the list of incompatible changes, maybe someone will have better luck. I tried to use docker instead of docker-py in Dockerfile-alpine and got a lengthy trace of errors, ending with such "suggestion":
TypeError: 'ContainerCollection' object is not callable. You might be trying to use the old (pre-2.0) API - use docker.APIClient if so.

If developers decide to use docker package in the future, the codebase here needs to be adapted. Maybe, this is not a big task, but I am unable to do it.

@misolietavec
Copy link
Author

I apologize, the breaking changes (and new features) from version 1.10.6 (docker-py) to 2.0.0 (docker) can be found at docker-py documentation. The relevant changes, I think, are:

  • docker.Client has been renamed to docker.APIClient
  • docker.from_env now creates a DockerClient instance instead of an APIClient instance
  • create_host_config, create_ipam_pool and create_ipam_config have been removed from docker.utils. They have been replaced by the following classes in docker.types: HostConfig, IPAMPool and IPAMCOnfig.
  • (new feature) Added a high-level, user-focused API as docker.DockerClient

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

No branches or pull requests

1 participant