I’m running into this issue as well. I wouldn’t mind helping figure out some kind of solution or process to hack a solution.
I’ve found something that kind of works, but it’s unreliable—which leads me to believe it’s possible this hack doesn’t work as I think it may be.
I’ll run the mix phx.gen.release --docker command and then get a fail. As said before, often I’ll get a 504 back, but it’s from Cloudflare. This makes me wonder if it’s some kind of cache-miss issue.
I’ll run some curl commands and walk up the stack starting with curl --head “http://hub.docker.com/v2/namespaces/hexpm/repositories/elixir/tags?name=:
<elixir-version>-erlang-<erlang-version>-
<elixir-version>-erlang-<erlang-version>-debian-
<elixir-version>-erlang-<erlang-version>-debian-trixie-
The first two will usually work. The last will usually fail. But after a brief amount of time, it’ll succeed, and I’ll be able to re-run the mix task.
I don’t know how important it is for the mix task to fully finish. I know it’ll create the rel/ dir and lib/os/release.ex file. It’s possible it only needs to finish to create the Dockerfile and .dockerignore files. If that’s the case, you can fetch those here-ish and fill in the missing values.
If you don’t know what values you’re missing, try running a command like this: curl -s "https://hub.docker.com/v2/namespaces/hexpm/repositories/elixir/tags?name=<elixir-version>-erlang-<erlang-version>-" | jq '.results[] | .name' (requires jq to be installed).
You can take those values and plug them into the Dockerfile template (specifically in the 3 args up top).
Here’s an example:
> url="https://hub.docker.com/v2/namespaces/hexpm/repositories/elixir/tags?name=1.19.5-erlang-28.4.1-debian-"
> curl -s "$url" | jq -r '.results[] | .name'
1.19.5-erlang-28.4.1-ubuntu-noble-20260217
1.19.5-erlang-28.4.1-ubuntu-jammy-20260217
1.19.5-erlang-28.4.1-debian-trixie-20260316-slim
1.19.5-erlang-28.4.1-debian-trixie-20260316
1.19.5-erlang-28.4.1-debian-bullseye-20260316-slim
1.19.5-erlang-28.4.1-debian-bullseye-20260316
1.19.5-erlang-28.4.1-debian-bookworm-20260316-slim
1.19.5-erlang-28.4.1-debian-bookworm-20260316
1.19.5-erlang-28.4.1-ubuntu-focal-20250404
1.19.5-erlang-28.4.1-ubuntu-jammy-20260109
I’ll plug in the following args (picking the latest trixie build available) into the Dockerfile from the link above:
ARG ELIXIR_VERSION=1.19.5
ARG OTP_VERSION=28.4.1
ARG DEBIAN_VERSION=trixie-20260316-slim
Again, I don’t know if anything is being done between the timeout and the creation of the two Docker-related files. Hopefully this gets someone out of a bind.