diff --git a/.github/workflows/publish_elixir-ubuntu.yml b/.github/workflows/publish_elixir-ubuntu.yml index f31bbfa..e13ec27 100644 --- a/.github/workflows/publish_elixir-ubuntu.yml +++ b/.github/workflows/publish_elixir-ubuntu.yml @@ -13,6 +13,7 @@ jobs: - elixir-ubuntu-16-04 - elixir-ubuntu-18-04 - elixir-ubuntu-20-04 + - elixir-ubuntu-22-04 steps: - uses: actions/checkout@v2 - name: Log in to GitHub Container Registry diff --git a/elixir-ubuntu-22-04/Dockerfile b/elixir-ubuntu-22-04/Dockerfile new file mode 100644 index 0000000..659356e --- /dev/null +++ b/elixir-ubuntu-22-04/Dockerfile @@ -0,0 +1,38 @@ +FROM ubuntu:22.04 +MAINTAINER Fröjd + +ARG DEBIAN_FRONTEND=noninteractive + +ARG ERLANG_VERSION +ENV ERLANG_VERSION ${ERLANG_VERSION:-25.3} + +ARG ELIXIR_VERSION +ENV ELIXIR_VERSION ${ELIXIR_VERSION:-1.15.7-otp-25} + +RUN apt-get update -y && apt-get install -y \ + curl \ + git \ + unzip \ + locales + +# Ensure that we always use UTF-8 and with en_US locale +RUN locale-gen en_US.UTF-8 +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +# Install asdf +RUN git clone --depth 1 https://github.com/asdf-vm/asdf.git ~/.asdf +ENV PATH="$PATH:/root/.asdf/bin" +ENV PATH="$PATH:/root/.asdf/bin" +ENV PATH=$PATH:/root/.asdf/shims + +RUN asdf plugin-add erlang https://github.com/michallepicki/asdf-erlang-prebuilt-ubuntu-22.04.git +RUN asdf install erlang $ERLANG_VERSION +RUN asdf global erlang $ERLANG_VERSION + +RUN asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git +RUN asdf install elixir $ELIXIR_VERSION +RUN asdf global elixir $ELIXIR_VERSION + +RUN mix local.hex --force && mix local.rebar --force + +CMD ["iex"] diff --git a/elixir-ubuntu-22-04/Makefile b/elixir-ubuntu-22-04/Makefile new file mode 100644 index 0000000..4fea67a --- /dev/null +++ b/elixir-ubuntu-22-04/Makefile @@ -0,0 +1,28 @@ +NAME = ghcr.io/frojd/dockerimages/elixir-ubuntu-22-04 + +build: + docker build -t $(NAME):1.16.1 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=25.3 --build-arg ELIXIR_VERSION=1.15.7-otp-25 . + docker build -t $(NAME):1.15.7 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=25.3 --build-arg ELIXIR_VERSION=1.15.7-otp-25 . + docker build -t $(NAME):1.14.5 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=25.3 --build-arg ELIXIR_VERSION=1.14.5-otp-25 . + docker build -t $(NAME):1.13.4 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=24.3 --build-arg ELIXIR_VERSION=1.13.4-otp-25 . + docker build -t $(NAME):1.12.3 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=24.3 --build-arg ELIXIR_VERSION=1.13.4-otp-24 . + + docker tag $(NAME):1.16.1 $(NAME):1.16 + docker tag $(NAME):1.15.7 $(NAME):1.15 + docker tag $(NAME):1.14.5 $(NAME):1.14 + docker tag $(NAME):1.13.4 $(NAME):1.13 + docker tag $(NAME):1.12.3 $(NAME):1.12 + docker tag $(NAME):1.16 $(NAME):latest + +push: + docker push $(NAME):1.12 + docker push $(NAME):1.12.3 + docker push $(NAME):1.13 + docker push $(NAME):1.13.4 + docker push $(NAME):1.14 + docker push $(NAME):1.14.5 + docker push $(NAME):1.15 + docker push $(NAME):1.15.7 + docker push $(NAME):1.16 + docker push $(NAME):1.16.1 + docker push $(NAME):latest