Skip to content

Set Docker Image to use on Fly

Posted on:September 9, 2022 at 01:35 AM

I’m working on a new Phoenix application that I wanted to deploy to I started with version 1.14 of Elixir which was released a few days ago and when I went to deploy it Fly failed to deply because it couldn’t find the correct Docker image:

Error failed to fetch an image or build from source: error building: failed to solve with frontend dockerfile.v0: 
failed to create LLB definition: not found

I thought it was strange that it’s trying to find an image with a date in the name that pre-dates the release of the version I’m using 🤔. There must be a way to tell Fly what image I want to use as a base, right? There is! Open fly.toml and add an entry for the following:

  image = "hexpm/elixir:1.14.0-erlang-25.0.4-debian-bullseye-20220801-slim"

This will go get the appropriate image for my use case but any image on Docker hub can be specified here.