Skip to content

Commit

Permalink
Add support for ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
marteinn committed Feb 12, 2024
1 parent dd54285 commit b1f80dd
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish_elixir-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions elixir-ubuntu-22-04/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
28 changes: 28 additions & 0 deletions elixir-ubuntu-22-04/Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b1f80dd

Please sign in to comment.