Use debian's version of rebar3 instead of downloading a binary. This was useful when the container was based on debian 11 where rebar3 wasn't in debian's repositories. Debian 12 has version 3.19.0.
This also solves a caching problem on one of the jenkins nodes, which currently fails at this line: ADD https://github.com/erlang/rebar3/archive/refs/tags/${REBAR3_VERSION}.tar.gz /tmp/rebar3.tar.gz with: ERROR: failed to solve: failed to load cache key: invalid not-modified ETag: "fce57989250a021a2be5fe5eddd655d6d415eef04f769bf1437f3d6dddfa5559"
My understanding is that docker has cached an ETag that is no longer valid / maybe the format changed - and instead of simply requesting the file again, it just fails there.