Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaAK committed Dec 4, 2024
1 parent 72ef570 commit 242e3b9
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,30 @@ jobs:
platforms: linux/amd64
tags: mikaak/elixir-node:1.13-alpine

- name: Build and push elixir:1.13-otp25-debian
uses: docker/build-push-action@v2
with:
push: true
file: elixir-debian-otp-25.Dockerfile
platforms: linux/amd64,linux/arm64
tags: mikaak/elixir:1.13-otp25-debian

- name: Build and push elixir-node:1.13-otp-25-alpine
uses: docker/build-push-action@v2
with:
push: true
file: node-elixir-debian-otp-25.Dockerfile
platforms: linux/amd64,linux/arm64
tags: mikaak/elixir-node:1.13-otp25-debian

- name: Build and push elixir-terraform-ansible-builder:1.13-otp25-debian
uses: docker/build-push-action@v2
with:
push: true
file: elixir-debian-terraform-ansible-otp-25.Dockerfile
platforms: linux/amd64,linux/arm64
tags: mikaak/elixir-terraform-ansible-builder:1.13-otp25-debian

- name: Build and push elixir:1.17-otp27-debian
uses: docker/build-push-action@v2
with:
Expand Down
84 changes: 84 additions & 0 deletions elixir-debian-otp-25.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
FROM buildpack-deps:bullseye

ENV OTP_VERSION="25.0.4" \
MIX_ENV="PROD" \
RUNTIME_DEPS="libodbc1 libsctp1 libwxgtk3.0" \
BUILD_DEPS="unixodbc-dev libsctp-dev" \
OTP_DOWNLOAD_SHA256="05878cb51a64b33c86836b12a21903075c300409b609ad5e941ddb0feb8c2120"

LABEL org.opencontainers.image.version=$OTP_VERSION

RUN set -xe \
&& apt-get update \
&& apt-get install -y --no-install-recommends $RUNTIME_DEPS $BUILD_DEPS \
&& echo "deb http://ftp.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list \
&& echo "deb-src http://ftp.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y -t bullseye-backports libwxgtk-webview3.0-gtk3-dev \
&& apt-get install -y python3-pip jq \
&& OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \
&& curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \
&& echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \
&& export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" \
&& mkdir -vp $ERL_TOP \
&& tar -xzf otp-src.tar.gz -C $ERL_TOP --strip-components=1 \
&& rm otp-src.tar.gz \
&& ( cd $ERL_TOP \
&& ./otp_build autoconf \
&& GNU_ARCH="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" \
&& ./configure --build="$GNU_ARCH" --disable-jit \
&& make -j$(nproc) \
&& make -j$(nproc) docs DOC_TARGETS=chunks \
&& make install install-docs DOC_TARGETS=chunks) \
&& find /usr/local -name examples | xargs rm -rf \
&& apt-get purge -y --auto-remove $BUILD_DEPS \
&& rm -rf $ERL_TOP /var/lib/apt/lists/*

CMD ["erl"]

# extra useful tools here: rebar & rebar3
ENV REBAR_VERSION="2.6.4" \
REBAR_DOWNLOAD_SHA256="577246bafa2eb2b2c3f1d0c157408650446884555bf87901508ce71d5cc0bd07"

RUN set -xe \
&& REBAR_DOWNLOAD_URL="https://github.com/rebar/rebar/archive/${REBAR_VERSION}.tar.gz" \
&& mkdir -p /usr/src/rebar-src \
&& curl -fSL -o rebar-src.tar.gz "$REBAR_DOWNLOAD_URL" \
&& echo "$REBAR_DOWNLOAD_SHA256 rebar-src.tar.gz" | sha256sum -c - \
&& tar -xzf rebar-src.tar.gz -C /usr/src/rebar-src --strip-components=1 \
&& rm rebar-src.tar.gz \
&& cd /usr/src/rebar-src \
&& ./bootstrap \
&& install -v ./rebar /usr/local/bin/ \
&& rm -rf /usr/src/rebar-src

ENV REBAR3_VERSION="3.19.0" \
REBAR3_DOWNLOAD_SHA256="ff9ef42c737480477ebdf0dd9d95ece534a14c96f05edafbf32e9af973280bc3"

RUN set -xe \
&& REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \
&& mkdir -p /usr/src/rebar3-src \
&& curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \
&& echo "$REBAR3_DOWNLOAD_SHA256 rebar3-src.tar.gz" | sha256sum -c - \
&& tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \
&& rm rebar3-src.tar.gz \
&& cd /usr/src/rebar3-src \
&& HOME=$PWD ./bootstrap \
&& install -v ./rebar3 /usr/local/bin/ \
&& rm -rf /usr/src/rebar3-src

ENV ELIXIR_DOWNLOAD_SHA256="95daf2dd3052e6ca7d4d849457eaaba09de52d65ca38d6933c65bc1cdf6b8579" \
ELIXIR_VERSION="v1.13.4" \
LANG="C.UTF-8"

RUN set -xe \
&& ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \
&& curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \
&& echo "$ELIXIR_DOWNLOAD_SHA256 elixir-src.tar.gz" | sha256sum -c - \
&& mkdir -p /usr/local/src/elixir \
&& tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \
&& rm elixir-src.tar.gz \
&& cd /usr/local/src/elixir \
&& make install clean \
&& find /usr/local/src/elixir/ -type f -not -regex "/usr/local/src/elixir/lib/[^\/]*/lib.*" -exec rm -rf {} + \
&& find /usr/local/src/elixir/ -type d -depth -empty -delete
23 changes: 23 additions & 0 deletions elixir-debian-terraform-ansible-otp-25.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM mikaak/elixir-node:1.13-otp-25-debian

ENV OTP_VERSION="25.0" \
REBAR_VERSION="2.6.4" \
REBAR3_VERSION="3.18.0" \
MIX_ENV="PROD"

# Terraform
RUN apt-get update -qq \
&& apt-get upgrade -y \
&& apt-get install -y ansible wget unzip \
&& rm -rf /var/lib/apt/lists/*

RUN TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \"\,\v | awk '{$1=$1};1'` \
&& wget -q https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip \
&& unzip terraform_${TER_VER}_linux_amd64.zip \
&& mv terraform /usr/local/bin/

# AWS CLI & Extras
RUN pip install awscli
RUN curl -sL https://sentry.io/get-cli/ | bash

CMD ["tail", "-f", "/dev/null"]

0 comments on commit 242e3b9

Please sign in to comment.