-
Notifications
You must be signed in to change notification settings - Fork 656
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
Informs of the DOCKER_HOST environment variable with the Docker driver. #2265
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
molecule/driver/docker.py
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must be installed on the machine that run Molecule even if the | |
must be installed on the machine that runs Molecule even if the |
There was a problem hiding this comment.
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)
molecule/driver/docker.py
Outdated
@@ -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 |
There was a problem hiding this comment.
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)
Molecule did fail asking for the docker binary, at first. After installing/removing the docker packages, everything works fine. |
@flowgunso Please fix the linting error and this is good to merge. A welcomed improvement to the docs. |
There was a problem hiding this 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>
OK, rebased. |
Uhhhh, very weird CI error:
Is this related!? |
Signed-off-by: flow.gunso <flow.gunso@gmail.com>
Alright, I removed the problematic character but did not add the encoding header line. |
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