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

Support for new docker sdk (quick fix) #764

Merged
merged 2 commits into from Mar 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -104,7 +104,7 @@ Install Molecule using pip:
.. code-block:: bash

$ pip install ansible
$ pip install docker-py
$ pip install docker
$ pip install molecule

Create a new role with the docker driver:
Expand Down
4 changes: 2 additions & 2 deletions doc/source/driver/docker/index.rst
Expand Up @@ -27,7 +27,7 @@ Options
privileged mode.
* ``registry`` - **(default='')** the registry to obtain the image.
* ``port_bindings`` - **(default={})** the port mapping between the Docker host
and the container. This is passed to docker-py as the port_bindings
and the container. This is passed to docker as the port_bindings
`host config`_.
* ``volume_mounts`` - **(default=[])** the volume mappings between the Docker
host and the container.
Expand All @@ -53,5 +53,5 @@ The available param for the Docker driver itself is:
* ``dockerfile`` - **(default=dockerfile)** supply a custom Dockerfile instead
of Molecule provided image.

.. _`host config`: https://github.com/docker/docker-py/blob/master/docs/port-bindings.md
.. _`host config`: https://docker-py.readthedocs.io/en/stable/api.html#docker.api.container.ContainerApiMixin.create_host_config
.. _`capability`: https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities
2 changes: 1 addition & 1 deletion doc/source/driver/docker/usage.rst
Expand Up @@ -7,7 +7,7 @@ Usage

.. code-block:: bash

$ pip install docker-py
$ pip install docker

.. code-block:: yaml

Expand Down
4 changes: 2 additions & 2 deletions molecule/driver/dockerdriver.py
Expand Up @@ -26,7 +26,7 @@
try:
import docker
except ImportError: # pragma: no cover
sys.exit('ERROR: Driver missing, install docker-py.')
sys.exit('ERROR: python docker driver missing, install the docker package.')

from molecule import util
from molecule.driver import basedriver
Expand All @@ -35,7 +35,7 @@
class DockerDriver(basedriver.BaseDriver):
def __init__(self, molecule):
super(DockerDriver, self).__init__(molecule)
self._docker = docker.Client(
self._docker = docker.APIClient(
version='auto', **docker.utils.kwargs_from_env())
self._containers = self.molecule.config.config['docker']['containers']
self._provider = self._get_provider()
Expand Down
2 changes: 1 addition & 1 deletion test-requirements.txt
@@ -1,4 +1,4 @@
docker-py==1.10.3
docker==2.1.0
mock
pytest
pytest-cov
Expand Down