Skip to content

Add txt files for docker buildsΒ #234

@SteffenDE

Description

@SteffenDE

As mentioned in #185, looking for Bob's docker images on Docker Hub is often a painful experience. Furthermore, phx.gen.release --docker frequently fails because the Docker Hub API times out when querying for the correct image to use.

To address this, I'm proposing to add a new txt file similar to https://builds.hex.pm/builds/elixir/builds.txt, which lists the available Docker images based on the following schema:

This is what phx.gen.release --docker would query when trying to find the right image for the currently running Elixir and OTP versions. (If you didn't know, the task does not try to get the latest version, but instead create a Docker image for the locally running versions instead).

It would look like this

# https://builds.hex.pm/builds/docker/hexpm-elixir-1.19.5-erlang-28.3.1.txt
1.19.5-erlang-28.3.1-ubuntu-noble-20260210.1 linux/amd64,linux/arm64/v8
1.19.5-erlang-28.3.1-debian-trixie-20260202-slim linux/amd64,linux/arm64/v8
1.19.5-erlang-28.3.1-debian-bookworm-20260202-slim linux/amd64,linux/arm64/v8
1.19.5-erlang-28.3.1-debian-bookworm-20260202 linux/amd64,linux/arm64/v8
1.19.5-erlang-28.3.1-debian-trixie-20260202 linux/amd64,linux/arm64/v8
...

See https://hex-bob-docker.steffend.me/hexpm-elixir-1.19.5-erlang-28.3.1.txt.

The exact format can of course be different, but I think it should contain the image tag and available architectures for that tag.

Whenever Bob builds a new image, it appends to the file for the given versions. Those files are basically append-only.

The idea behind that file is to make it easy to find the latest builds for a given Elixir and Erlang major-minor version:

1.19.5-erlang-28.3.1
1.19.5-erlang-28.2
1.19.5-erlang-28.1.1
1.19.5-erlang-28.0.2
1.18.4-erlang-28.3.1
...

A client can then look up the specific version file to find all builds. If someone wants to find the latest version, they just need to look at the first line of the file.

This file would be rewritten whenever frequently, such that only the latest major+minor versions are listed. See https://hex-bob-docker.steffend.me/hexpm-elixir-latest-major-minor.txt.

Based on those files, in the future there could also be a LiveView based UI to look up the available versions in a more user-friendly way.

cc @wojtekmach

(I used a LiveBook to fetch all the available Docker Hub data for most versions. If anyone's interested in it, it's here. If this was incorporated into Bob, I'm sure that there's a better way to know what to write instead of fetching all possible options from the Hub)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions