fly launch generates invalid dockerfile for phoenix application

Im launching a new phoenix app with fly launch

The dockerfile that is generated has the following:

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

But fly launch will have the following error:

✓ Configuration is valid
==> Building image
==> Building image with Depot
--> build:  (​)
[+] Building 1.1s (3/3) FINISHED                                                         
 => [internal] load build definition from Dockerfile                                0.1s
 => => transferring dockerfile: 2.82kB                                              0.1s
 => CANCELED [internal] load metadata for docker.io/library/debian:bookworm-202506  0.9s
 => ERROR [internal] load metadata for docker.io/hexpm/elixir:1.18.4-erlang-27.3.4  0.9s
------
 > [internal] load metadata for docker.io/hexpm/elixir:1.18.4-erlang-27.3.4-debian-bookworm-20250610-slim:
------
==> Building image
==> Building image with Depot
--> build:  (​)
[+] Building 0.5s (3/3) FINISHED                                                         
 => [internal] load build definition from Dockerfile                                0.1s
 => => transferring dockerfile: 2.82kB                                              0.1s
 => [internal] load metadata for docker.io/library/debian:bookworm-20250610-slim    0.3s
 => ERROR [internal] load metadata for docker.io/hexpm/elixir:1.18.4-erlang-27.3.4  0.4s
------
 > [internal] load metadata for docker.io/hexpm/elixir:1.18.4-erlang-27.3.4-debian-bookworm-20250610-slim:
------
Error: failed to fetch an image or build from source: error building: failed to solve: docker.io/hexpm/elixir:1.18.4-erlang-27.3.4-debian-bookworm-20250610-slim: failed to resolve source metadata for docker.io/hexpm/elixir:1.18.4-erlang-27.3.4-debian-bookworm-20250610-slim: no match for platform in manifest: not found

Looking at a previous, working, dockerfile fly generated for me last year for a different project, the BUILDER_IMAGE and RUNNER_IMAGE are the following:

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

The newly generated dockerfile has pre-pended docker.io/ to the variables. Removing them makes the dockerfile work.

Wondering if anyone knows why the generated dockerfile is wrong?

It looks like it’s just picking a bad tag, the pre-pending isn’t related

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.