sheerlox

sheerlox

Automatic updates of Elixir docker image with Renovate

I stumbled upon this issue this morning: Improve discoverability of available images · Issue #185 · hexpm/bob · GitHub

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.

This is a pain I also felt a few months ago, so I came up with a Renovate configuration that keeps hexpm/elixir up-to-date in my Dockerfile.

After finding the mentioned GitHub issue, I found it might interest some of you, so I’ve setup a minimal reproduction repository to showcase that :smile:

cc @rhcarvalho :wave:

Benefits of this config

  • Automatically updates the hexpm/elixir Docker base image tag (for Fly)
  • Keeps Elixir/OTP versions in sync between asdf (.tool-versions) and
    production Docker

How does it work

  1. We use version comments in [Dockerfile` to tell Renovate
    where to find the version information for each part of the image (Debian,
    OTP & Elixir)
  2. We setup a “Test Docker Build” CI workflow that makes sure the image tag
    composed from those three versions actually exist (so Renovate doesn’t
    auto-merge an inexistant image, if auto-merge is enabled in the first place)
  3. We add the regexManagers:dockerfileVersions preset and a few package rules
    for the Debian versioning

When merging update PRs for each component, I find it’s best to merge them in
this order: Debian > OTP > Elixir.

https://github.com/sheerlox/elixir_renovate_demo

Most Liked

D4no0

D4no0

This is pretty neat, this was always a pain in the ass to configure, especially when dockerhub elixir images didn’t use to have the OTP version specified.

Where Next?

Popular in Discussions Top

sashaafm
I’m trying to evaluate the best combo/stack for a BEAM Web app. Right now I’m exploring Yaws a bit, after having dealt with Phoenix for a...
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
MarioFlach
Hello, I want to share a project I’ve been working on for a while: https://github.com/almightycouch/gitgud Background Some time ago I ...
New
sashaafm
Piggy backing a bit on @dvcrn topic BEAM optimization for functions with static return type?, I’ve been trying to understand in a deeper ...
New
WildYorkies
It seems that the more I read, the more I find Elixir users speaking about all the ways that Elixir is not good for x, y, and z use cases...
New
hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
Qqwy
I would like to spark a discussion about the static access operator: .. For whom does not know: it is used in Elixir to access fields of...
New
ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New

Other popular topics Top

Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30877 112
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement