test-kitchen / kitchen-dokken

Test Kitchen driver/provisioner for lightning faster Chef Infra cookbook testing with Docker
Other
196 stars 91 forks source link

Specifying docker_host_url does not work #321

Open tomhughes opened 7 months ago

tomhughes commented 7 months ago

:ghost: Brief Description

Specifying docker_host_url in the configuration does not work because dokken still tries to connect to the default docker and errors our when that fails.

Version

kitchen-dokken 2.20.3

Environment

Fedora 39

Scenario

Trying to use a user podman instance as the docker implementation.

Steps to Reproduce

Specify the URL as follows:

driver:
  name: dokken
  docker_host_url: unix:///run/user/1000/podman/podman.sock

Expected Result

It works.

Actual Result

It errors out trying to make a TCP connection to docker:

kitchen-dokken could not connect to the docker host at tcp://127.0.0.1:2375. Is docker running?

:heavy_plus_sign: Additional context

The code at https://github.com/test-kitchen/kitchen-dokken/blob/1035b971a7685633e126084f731a334b492727e2/lib/kitchen/driver/dokken.rb#L48 causes docker_info to be called which tries to make a connection to default_docker_host which errors out.