ansible-community / molecule-docker

🚧 Assimilated into molecule-plugins
https://github.com/ansible-community/molecule-plugins
MIT License
77 stars 39 forks source link

DOCKER command not found in PATH #98

Closed pidumenk closed 2 years ago

pidumenk commented 3 years ago

Hello, colleagues. Does anyone can help me with a question?

When I use molecule to test roles in docker containers on a remote machine, I suppose my scenario will be executed on the remote docker specified via environment variable DOCKER_HOST. On the converge step I currently faced with an error sounds like "msg: docker command not found in PATH". I don't have docker installed on my master host with molecule because I had configured remote docker daemon on a target host by tcp://0.0.0.0:2376.

I have no idea how to avoid this issue starting "molecule converge" without docker installed on my master host (there are only python-docker and molecule dependencies) .

I'm using venv and my pip list consists of the next items:

pip list | egrep "docker|ansible|lint"
ansible-base                      2.10.13
ansible-compat                    0.5.0
ansible-lint                      5.1.3
docker                            5.0.2
molecule-docker                   1.0.2
yamllint                          1.26.3

These variables are specified in my ~/.bashrc:

DOCKER_HOST=<host_name>
DOCKER_TLS_HOSTNAME=<host_name>
DOCKER_TLS_VERIFY=1
DOCKER_CERT_PATH=<path_to_certs>

It seems like molecule is looking for local docker-client, but "create" step have been made well on a target host (where docker is installed). Only "converge" things fail with a message: docker command not found in PATH. Below is attached the full output my molecule scenario. You can see an error on the 1199th line. Could you, please, give any advise for this issue?

converge_output.txt cache_inventory.txt