Skip to content

Commit

Permalink
Port elixir-ubuntu-18-04 to asdf based image
Browse files Browse the repository at this point in the history
  • Loading branch information
marteinn committed Feb 13, 2024
1 parent a7c57e0 commit d47c34d
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_elixir-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
docker-image:
- elixir-ubuntu-22-04
- elixir-ubuntu-20-04
- elixir-ubuntu-18-04
#- elixir-ubuntu-16-04
#- elixir-ubuntu-18-04
steps:
- uses: actions/checkout@v2
- name: Log in to GitHub Container Registry
Expand Down
32 changes: 24 additions & 8 deletions elixir-ubuntu-18-04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
FROM ubuntu:18.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.8.1-1}
ENV ELIXIR_VERSION ${ELIXIR_VERSION:-1.15.7-otp-25}

RUN apt-get update && apt-get -y install wget sudo gnupg \
&& apt-get -y install git ssh ca-certificates locales \
&& wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
&& dpkg -i erlang-solutions_1.0_all.deb
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'

RUN apt-get update \
&& apt-get -y install esl-erlang elixir=$ELIXIR_VERSION \
&& rm -rf /var/lib/apt/lists/*
# 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-18.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

Expand Down
68 changes: 42 additions & 26 deletions elixir-ubuntu-18-04/Makefile
Original file line number Diff line number Diff line change
@@ -1,40 +1,56 @@
NAME = ghcr.io/frojd/dockerimages/elixir-ubuntu-18-04

build:
docker build -t $(NAME):1.13.0 --rm --build-arg ELIXIR_VERSION=1.13.0-1 .
docker build -t $(NAME):1.12.2 --rm --build-arg ELIXIR_VERSION=1.12.2-1 .
docker build -t $(NAME):1.11.4 --rm --build-arg ELIXIR_VERSION=1.11.4-1 .
docker build -t $(NAME):1.10.4 --rm --build-arg ELIXIR_VERSION=1.10.4-1 .
docker build -t $(NAME):1.9.4 --rm --build-arg ELIXIR_VERSION=1.9.4-1 .
docker build -t $(NAME):1.8.1 --rm --build-arg ELIXIR_VERSION=1.8.1-1 .
docker build -t $(NAME):1.7.4 --rm --build-arg ELIXIR_VERSION=1.7.4-1 .
docker build -t $(NAME):1.6.6 --rm --build-arg ELIXIR_VERSION=1.6.6-1 .
docker build -t $(NAME):1.16.1 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=26.2 --build-arg ELIXIR_VERSION=1.16.1-otp-26 .
docker build -t $(NAME):1.15.7 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=26.2 --build-arg ELIXIR_VERSION=1.15.7-otp-26 .
docker build -t $(NAME):1.14.5 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=26.2 --build-arg ELIXIR_VERSION=1.14.5-otp-26 .
docker build -t $(NAME):1.13.4 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=25.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.12.3-otp-24 .
docker build -t $(NAME):1.11.4 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=24.3 --build-arg ELIXIR_VERSION=1.11.4-otp-24 .
docker build -t $(NAME):1.10.4 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=23.3 --build-arg ELIXIR_VERSION=1.10.4-otp-23 .
docker build -t $(NAME):1.9.4 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=22.3 --build-arg ELIXIR_VERSION=1.9.4-otp-22 .
docker build -t $(NAME):1.8.4 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=22.3 --build-arg ELIXIR_VERSION=1.8.4-otp-22 .
docker build -t $(NAME):1.7.4 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=22.3 --build-arg ELIXIR_VERSION=1.7.4-otp-22 .
docker build -t $(NAME):1.6.6 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=21.3 --build-arg ELIXIR_VERSION=1.6.6-otp-21 .
docker build -t $(NAME):1.5.3 --rm --platform linux/x86_64 --build-arg ERLANG_VERSION=20.3 --build-arg ELIXIR_VERSION=1.5.3-otp-20 .

docker tag $(NAME):1.13.0 $(NAME):1.13
docker tag $(NAME):1.12.2 $(NAME):1.12
docker tag $(NAME):1.16.1 $(NAME):1.16
docker tag $(NAME):1.15.7 $(NAME):1.13
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.11.4 $(NAME):1.11
docker tag $(NAME):1.10.4 $(NAME):1.10
docker tag $(NAME):1.9.4 $(NAME):1.9
docker tag $(NAME):1.8.1 $(NAME):1.8
docker tag $(NAME):1.8.4 $(NAME):1.8
docker tag $(NAME):1.7.4 $(NAME):1.7
docker tag $(NAME):1.6.6 $(NAME):1.6
docker tag $(NAME):1.13 $(NAME):latest
docker tag $(NAME):1.5.3 $(NAME):1.5
docker tag $(NAME):1.16 $(NAME):latest

push:
docker push $(NAME):1.13
docker push $(NAME):1.13.0
docker push $(NAME):1.12
docker push $(NAME):1.12.2
docker push $(NAME):1.11
docker push $(NAME):1.11.4
docker push $(NAME):1.10
docker push $(NAME):1.10.4
docker push $(NAME):1.9
docker push $(NAME):1.9.4
docker push $(NAME):1.8
docker push $(NAME):1.8.1
docker push $(NAME):1.7
docker push $(NAME):1.7.4
docker push $(NAME):1.5
docker push $(NAME):1.5.3
docker push $(NAME):1.6
docker push $(NAME):1.6.6
docker push $(NAME):1.7
docker push $(NAME):1.7.4
docker push $(NAME):1.8
docker push $(NAME):1.8.4
docker push $(NAME):1.9
docker push $(NAME):1.9.4
docker push $(NAME):1.10
docker push $(NAME):1.10.4
docker push $(NAME):1.11
docker push $(NAME):1.11.4
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 d47c34d

Please sign in to comment.