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

Informs of the DOCKER_HOST environment variable with the Docker driver. #2265

Merged
merged 4 commits into from
Sep 12, 2019
Merged

Informs of the DOCKER_HOST environment variable with the Docker driver. #2265

merged 4 commits into from
Sep 12, 2019

Conversation

flowgunso
Copy link
Contributor

Signed-off-by: flow.gunso flow.gunso@gmail.com

Add a note to the Docker driver documentation to inform that the DOCKER_HOST environment variable can be used to customize which Docker daemon Molecule uses.

The docker binary is still required on the machine that runs Molecule even when using a remote Docker instance, otherwise Molecule fails.

PR Type

  • Docs Pull Request

Copy link
Contributor

@decentral1se decentral1se left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -119,6 +119,11 @@ class Docker(base.Base):
less secure. For details, please reference `Docker Security
Configuration`_

.. note:: With the environment variable ``DOCKER_HOST`` the user can define
which `Docker`_ daemon to use. Do note that the `Docker`_ binary
must be installed on the machine that run Molecule even if the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
must be installed on the machine that run Molecule even if the
must be installed on the machine that runs Molecule even if the

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would worth mentioning that user can even use ssh transport protocol to connect to remote docker, something that works well for both docker-cli and docker-py but is not well documented, one of the reasons why I wrote https://docs.sbarnea.com/molecule/using-a-remote-docker some time ago.

The statement is false: user does not need to have docker installed on the localhost when using remoting. Docker-py talks directly with the remote host and you can avoid having to install docker locally. Molecule is using only docker-py (via ansible modules)

@@ -119,6 +119,11 @@ class Docker(base.Base):
less secure. For details, please reference `Docker Security
Configuration`_

.. note:: With the environment variable ``DOCKER_HOST`` the user can define
which `Docker`_ daemon to use. Do note that the `Docker`_ binary
must be installed on the machine that run Molecule even if the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would worth mentioning that user can even use ssh transport protocol to connect to remote docker, something that works well for both docker-cli and docker-py but is not well documented, one of the reasons why I wrote https://docs.sbarnea.com/molecule/using-a-remote-docker some time ago.

The statement is false: user does not need to have docker installed on the localhost when using remoting. Docker-py talks directly with the remote host and you can avoid having to install docker locally. Molecule is using only docker-py (via ansible modules)

@flowgunso
Copy link
Contributor Author

Molecule did fail asking for the docker binary, at first. After installing/removing the docker packages, everything works fine.

@ssbarnea
Copy link
Member

ssbarnea commented Sep 1, 2019

@flowgunso Please fix the linting error and this is good to merge. A welcomed improvement to the docs.

Copy link
Contributor

@decentral1se decentral1se left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this just needs a rebase and then the CI will not complain.

Signed-off-by: flow.gunso <flow.gunso@gmail.com>
Signed-off-by: flow.gunso <flow.gunso@gmail.com>
Signed-off-by: flow.gunso <flow.gunso@gmail.com>
@flowgunso
Copy link
Contributor Author

OK, rebased.

@decentral1se
Copy link
Contributor

Uhhhh, very weird CI error:

File "/home/travis/build/ansible/molecule/molecule/driver/docker.py", line 123 E SyntaxError: Non-ASCII character '\xc2' in file /home/travis/build/ansible/molecule/molecule/driver/docker.py on line 124, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Is this related!?

Signed-off-by: flow.gunso <flow.gunso@gmail.com>
@flowgunso
Copy link
Contributor Author

Alright, I removed the problematic character but did not add the encoding header line.

@decentral1se decentral1se merged commit f4e4fff into ansible:master Sep 12, 2019
@ssbarnea ssbarnea added the bug label Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants