-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve discoverability of available images #185
Comments
Unfortunately not, Docker Hub is the authority of what images are available. |
Hi Eric!
Okay, thanks for the answer! The job that publishes the images runs in some private infrastructure, right? Is the README up-to-date when it says that new images are built (possibly) every 15 minutes? Docker Hub being the source of truth, I'll see what I can put together with their API. |
I saw that there's already code in the repository that fetches the tags from Docker Hub (and even has a caching mechanism, seems battle-tested). Perhaps we just need to expose the list somewhere? I'm trying the existing code locally and seems that there are a lot of pages, so constantly running into rate limits (fortunately with retries). For later reference
|
Yes and yes.
Yes, we have a local cached copy of all tags in memory. With some logic to derive the latest version we can write the latest version to https://builds.hex.pm like we do for the elixir builds https://github.com/hexpm/bob/blob/main/priv/scripts/elixir/elixir.sh#L95 https://builds.hex.pm/builds/elixir/builds.txt. WDYT? |
Awesome, I was able to get one in memory on iex as well using the existing code 💜
Yes, I think it would solve the pain 👍 Even if some more parsing would be necessary, working with a file like https://builds.hex.pm/builds/elixir/builds.txt would be a much simpler and faster task than fetching data from Docker Hub. I originally thought of contributing a GitHub job that automatically updates the README with a table, something like (but not exactly the same as): https://github.com/rhcarvalho/cedict/blob/main/.github/workflows/update.yml But a link in the README to a file with a list of latest versions for a given combo of Elixir/OTP major versions and base OS/arch would address the pain of figuring out updates. With a small enough list, ctrl+f would be enough. To illustrate a bit the workflow that I'm trying to address, this is a recent update I did: diff --git Dockerfile Dockerfile
index 5eb24e9..61ee2cc 100644
--- Dockerfile
+++ Dockerfile
@@ -11,9 +11,9 @@
# - https://pkgs.org/ - resource for finding needed packages
# - Ex: hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim
#
-ARG ELIXIR_VERSION=1.15.7
-ARG OTP_VERSION=26.1.2
-ARG DEBIAN_VERSION=bookworm-20231009-slim
+ARG ELIXIR_VERSION=1.16.2
+ARG OTP_VERSION=26.2.3
+ARG DEBIAN_VERSION=bookworm-20240130-slim
ARG BUILDER_IMAGE="docker.io/hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
ARG RUNNER_IMAGE="docker.io/debian:${DEBIAN_VERSION}" Today when updating another project I realized there was a newer base image version diff --git Dockerfile Dockerfile
index 61ee2cc..702b2d8 100644
--- Dockerfile
+++ Dockerfile
@@ -12,8 +12,8 @@
# - Ex: hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim
#
ARG ELIXIR_VERSION=1.16.2
-ARG OTP_VERSION=26.2.3
-ARG DEBIAN_VERSION=bookworm-20240130-slim
+ARG OTP_VERSION=26.2.4
+ARG DEBIAN_VERSION=bookworm-20240423-slim
ARG BUILDER_IMAGE="docker.io/hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
ARG RUNNER_IMAGE="docker.io/debian:${DEBIAN_VERSION}" That's why I wanted a quick way to get the latest valid combo, in this case for Elixir 1.16, OTP 26, Debian bookworm, amd64. |
I came up last month with a Renovate configuration that keeps After stumbling upon this issue this morning, I created a minimum reproduction repository, and I just shared it on the forum: https://elixirforum.com/t/automatic-updates-of-elixir-docker-image-with-renovate/64170 Link to the repo: https://github.com/sheerlox/elixir_renovate_demo (you'll find extensive information in the README 😉) |
Every time I decide to bump image versions it gets frustrating to discover what is the lastest Elixir + OTP + base image that is a valid tag.
Referring to a previous discussion:
Originally posted by @wojtekmach in #180 (comment)
Before I volunteer to publish the "latest" combination somewhere, is there a way to get it from build/job logs or somewhere that doesn't involve getting multiple pages from the Docker Hub API?
The text was updated successfully, but these errors were encountered: