Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions elixir/1.10.4/fedora/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM avvo/erlang:23.0.4-fedora-32

# Adapted from:
# https://github.com/c0b/docker-elixir/blob/master/1.10/alpine/Dockerfile

# elixir expects utf8.
ENV ELIXIR_VERSION="v1.10.4" \
LANG=C.UTF-8

RUN set -xe \
&& ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \
&& ELIXIR_DOWNLOAD_SHA256="8518c78f43fe36315dbe0d623823c2c1b7a025c114f3f4adbb48e04ef63f1d9f" \
&& deps=' \
ca-certificates \
make \
automake \
gcc \
gcc-c++ \
kernel-devel \
openssh-clients \
npm \
git \
' \
&& dnf -y update \
&& dnf -y install $deps \
&& 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 \
&& dnf -y autoremove \
&& dnf -y clean all \
&& rm -rf /var/cache/yum \
&& mix local.hex --force \
&& mix local.rebar --force \
&& mkdir -p '/root/.ssh' \
&& ssh-keyscan -t rsa github.com > '/root/.ssh/known_hosts' \
&& chmod 700 '/root/.ssh' \
&& chmod 600 '/root/.ssh/known_hosts'
66 changes: 66 additions & 0 deletions erlang/23.0.4/fedora/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
FROM avvo/fedora:32

# Adapted from: https://github.com/erlang/docker-erlang-otp/blob/master/23/alpine/Dockerfile

ENV OTP_VERSION="23.0.4" \
REBAR3_VERSION="3.14.1"


RUN set -xe \
&& OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \
&& OTP_DOWNLOAD_SHA256="29e92db80229ec7903f93e5b152c7ca721cc44b58519199ea60b8e0d583faf93" \
&& REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \
&& REBAR3_DOWNLOAD_SHA256="b01275b6cbdb354dcf9ed686fce2b5f9dfdd58972ded9e970e31b9215a8521f2" \
&& curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \
&& echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \
&& buildDeps='\
gcc \
g++ \
make \
autoconf \
ncurses-devel \
unixODBC-devel \
openssl-devel \
findutils \
pax-utils \
' \
&& dnf -y update \
&& dnf -y install $buildDeps \
&& 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 \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install ) \
&& rm -rf $ERL_TOP \
&& find /usr/local -regex '/usr/local/lib/erlang/\(lib/\|erts-\).*/\(man\|doc\|obj\|c_src\|emacs\|info\|examples\)' | xargs rm -rf \
&& find /usr/local -name src | xargs -r find | grep -v '\.hrl$' | xargs rm -v || true \
&& find /usr/local -name src | xargs -r find | xargs rmdir -vp || true \
&& scanelf --nobanner -E ET_EXEC -BF '%F' --recursive /usr/local | xargs -r strip --strip-all \
&& scanelf --nobanner -E ET_DYN -BF '%F' --recursive /usr/local | xargs -r strip --strip-unneeded \
&& runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print $1 }' \
)" \
&& curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \
&& echo "${REBAR3_DOWNLOAD_SHA256} rebar3-src.tar.gz" | sha256sum -c - \
&& mkdir -p /usr/src/rebar3-src \
&& 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 \
&& dnf -y install \
$runDeps \
lksctp-tools \
ca-certificates \
&& dnf -y remove $buildDeps \
&& dnf -y autoremove \
&& dnf -y clean all \
&& rm -rf /var/cache/yum