Skip to content

Failed to find docker host. #224

@dennym

Description

@dennym
> TestContainer.start_link()
** (EXIT from #PID<0.1118.0>) shell process exited with reason: "Failed to find docker host: [testcontainer_host_from_properties: {:property_not_found, \"tc.host\"}], [testcontainer_host_from_properties: {:property_not_found, \"docker.host\"}], [docker_host_from_env: {:chec
kout_failure, \"DOCKER_HOST\"}], {:docker_socket_not_found, [\"/var/run/docker.sock\", \"/home/denym/.docker/run/docker.sock\", \"/home/denym/.docker/desktop/docker.sock\", \"/run/user/1000//podman/podman.sock\", \"/run/user/1000//docker.sock\"]}"

I tried running multiple ways and I have docker and podman available. The socks are running under /var/usr/docker.sock and /var/usr/podman/podman.sock.

DOCKER_HOST=unix:///var/run/podman/podman.sock iex -S mix phx.server
DOCKER_HOST=unix:///var/run/docker.sock iex -S mix phx.server

Its seems like the variable is not respected. Also exporting it beforehand does not result in any different behavior.
Reading the tests ... I also tried X_DOCKER_HOST which I can't comprehend why its that var but also won't work,

X_DOCKER_HOST=unix:///var/run/podman/podman.sock iex -S mix phx.server
X_DOCKER_HOST=unix:///var/run/docker.sock iex -S mix phx.server

I also tried creating ~/.testcontainers.properties with docker.host=unix:///var/run/docker.sock but this file also seems not to be respected.

Any ideas or suggestion how to go from here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions