diff --git a/mix.exs b/mix.exs index 5ff1978..bcce293 100644 --- a/mix.exs +++ b/mix.exs @@ -47,9 +47,20 @@ defmodule Excontainers.MixProject do # {:dep_from_hexpm, "~> 0.3.0"}, # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} - # Only ever reached through Tesla.Adapter.Hackney, so we mirror Tesla's own - # supported range: hackney 2.x/3.x/4.0.0/4.0.1 lack exports Tesla relies on. - {:hackney, "~> 1.16 or ~> 4.0 and >= 4.0.2"}, + # Pinned to 1.x on purpose: we reach the Docker daemon over a unix domain + # socket (`http+unix://%2Fvar%2Frun%2Fdocker.sock`, see Docker.Api.HackneyHost) + # and hackney 4.x cannot connect to one. 4.x still parses the URL correctly + # and ships an identical hackney_local_tcp, but its rewritten connection + # layer sends the request through hackney_happy (happy-eyeballs DNS) and + # never dispatches the local_tcp transport: + # + # :hackney.request(:get, "http+unix://%2Fvar%2Frun%2Fdocker.sock/v1.41/version", [], "", []) + # 1.25.0 => {:error, :enoent} (tried the socket) + # 4.7.2 => {:error, :nxdomain} (tried DNS) + # + # Swapping adapters is not an option either — hackney is the only Tesla + # adapter with unix-socket support. Revisit once upstream restores it. + {:hackney, "~> 1.16"}, {:jason, ">= 1.0.0"}, {:tesla, "~> 1.4"}, {:gestalt, "~> 1.0 or ~> 2.0"},