Skip to content

Commit

Permalink
correct how to install Docker SDK for Python (ansible#74288)
Browse files Browse the repository at this point in the history
* docs: correct guide for the latest Docker SDK for Python
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Daeseok Youn <daeseok.youn@navercorp.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
  • Loading branch information
daeseokyoun committed Apr 20, 2021
1 parent 7b39ee3 commit 9369bd6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/docsite/rst/scenario_guides/guide_docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@ Most of the modules and plugins in community.docker require the `Docker SDK for

Note that plugins (inventory plugins and connection plugins) are always executed in the context of Ansible itself. If you use a plugin that requires the Docker SDK for Python, you need to install it on the machine running ``ansible`` or ``ansible-playbook`` and for the same Python interpreter used by Ansible. To see which Python is used, run ``ansible --version``.

You can install the Docker SDK for Python for Python 2.7 or Python 3 as follows:
You can install the Docker SDK for Python for Python 3.6 or later as follows:

.. code-block:: bash
$ pip install docker
For Python 2.6, you need a version before 2.0. For these versions, the SDK was called ``docker-py``, so you need to install it as follows:
For Python 2.7, you need to use a version between 2.0.0 and 4.4.4 since the Python package for Docker removed support for Python 2.7 on 5.0.0. You can install the specific version of the Docker SDK for Python as follows:

.. code-block:: bash
$ pip install 'docker==4.4.4'
For Python 2.6, you need a version before 2.0.0. For these versions, the SDK was called ``docker-py``, so you need to install it as follows:

.. code-block:: bash
Expand Down

0 comments on commit 9369bd6

Please sign in to comment.