Phoenix guide seems broken: running `fly launch` on empty Phoenix project fails on non-existent Docker image

tl;dr: following the steps of the Phoenix guide (on my computer) leads to a => ERROR [internal] load metadata for docker.io/hexpm/elixir:1.13.4-erlang-25.0.4-debian-bullseye-20210902-slim on fly launch build

Seems to be already recognized as fly launch on Elixir apps is brittle (but closed)

fly launch generates a Dockerfile with these contents:

ARG ELIXIR_VERSION=1.13.4
ARG OTP_VERSION=25.0.4
ARG DEBIAN_VERSION=bullseye-20210902-slim

ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"

If I look at the flyctl repository it isn’t the same file as phoenix/Dockerfile, but apparently comes from somewhere else.

The Debian version seems too low for this combination of elixir and erlang. debian-bullseye-20220801-slim exists and that works fine.

Do you know what version of Phoenix you’re running? Phoenix 1.6.3 or later apps actually use the built in Phoenix Docker generator now (which was the result of the post about deploys being brittle). It works really well!

What error are you getting from the actual generated image? If it’s generating an image that doesn’t build, I think it’s worth a GitHub issue.

This is on Phoenix 1.6.11 and fly launch indeed seems to be generating the same Dockerfile as using mix phx.gen.release --docker. That Dockerfile is broken: as the code snippet above shows it interpolates an image tag that doesn’t exist on Dockerhub. Presumably because the Debian version is quite old.

What error are you getting from the actual generated image?

The image doesn’t build; see the first line of the OP. Or I’m misunderstanding your question.