From 7cf8d6e3403134171d6d497475cd52d518a2c756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?19=E5=B9=B4=E6=A2=A6=E9=86=92?= <3949379+getong@users.noreply.github.com> Date: Wed, 21 Feb 2024 05:58:19 +0800 Subject: [PATCH] add erlang/otp 27.0-rc1, update 26.2.2, 25.3.2.9, 24.3.4.16 --- .github/workflows/erlang.yaml | 1 + 24/Dockerfile | 8 ++-- 24/alpine/Dockerfile | 8 ++-- 24/slim/Dockerfile | 8 ++-- 25/Dockerfile | 8 ++-- 25/alpine/Dockerfile | 8 ++-- 25/slim/Dockerfile | 8 ++-- 26/Dockerfile | 8 ++-- 26/alpine/Dockerfile | 8 ++-- 26/slim/Dockerfile | 8 ++-- 27/Dockerfile | 70 +++++++++++++++++++++++++++++++++++ 27/alpine/Dockerfile | 68 ++++++++++++++++++++++++++++++++++ 27/slim/Dockerfile | 63 +++++++++++++++++++++++++++++++ generate-stackbrew-library.sh | 2 +- 14 files changed, 239 insertions(+), 37 deletions(-) create mode 100644 27/Dockerfile create mode 100644 27/alpine/Dockerfile create mode 100644 27/slim/Dockerfile diff --git a/.github/workflows/erlang.yaml b/.github/workflows/erlang.yaml index 6056c730..07183159 100644 --- a/.github/workflows/erlang.yaml +++ b/.github/workflows/erlang.yaml @@ -8,6 +8,7 @@ jobs: strategy: matrix: otp: ['DIR=master', 'DIR=master VARIANT=alpine', + 'DIR=27', 'DIR=27 VARIANT=slim', 'DIR=27 VARIANT=alpine', 'DIR=26', 'DIR=26 VARIANT=slim', 'DIR=26 VARIANT=alpine', 'DIR=25', 'DIR=25 VARIANT=slim', 'DIR=25 VARIANT=alpine', 'DIR=24', 'DIR=24 VARIANT=slim', 'DIR=24 VARIANT=alpine', diff --git a/24/Dockerfile b/24/Dockerfile index f1277d18..028f007a 100644 --- a/24/Dockerfile +++ b/24/Dockerfile @@ -1,7 +1,7 @@ FROM buildpack-deps:bullseye -ENV OTP_VERSION="24.3.4.15" \ - REBAR3_VERSION="3.20.0" +ENV OTP_VERSION="24.3.4.16" \ + REBAR3_VERSION="3.22.1" LABEL org.opencontainers.image.version=$OTP_VERSION @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.version=$OTP_VERSION # build process: RUN set -xe \ && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && OTP_DOWNLOAD_SHA256="2c014720eb2d2da7f195e4c7ced20b6e9eed664b6d65e2083be9e698e63224df" \ + && OTP_DOWNLOAD_SHA256="f434c19d62b29ad8ef5300a490b9ea9df9cbfdd497c68603b184d43448418fa2" \ && runtimeDeps='libodbc1 \ libsctp1 \ libwxgtk3.0 \ @@ -58,7 +58,7 @@ RUN set -xe \ RUN set -xe \ && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ - && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ && 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 - \ diff --git a/24/alpine/Dockerfile b/24/alpine/Dockerfile index 5a549cda..302b8a2d 100644 --- a/24/alpine/Dockerfile +++ b/24/alpine/Dockerfile @@ -1,14 +1,14 @@ FROM alpine:3.17 -ENV OTP_VERSION="24.3.4.15" \ - REBAR3_VERSION="3.20.0" +ENV OTP_VERSION="24.3.4.16" \ + REBAR3_VERSION="3.22.1" LABEL org.opencontainers.image.version=$OTP_VERSION RUN set -xe \ && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && OTP_DOWNLOAD_SHA256="2c014720eb2d2da7f195e4c7ced20b6e9eed664b6d65e2083be9e698e63224df" \ - && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" \ + && OTP_DOWNLOAD_SHA256="f434c19d62b29ad8ef5300a490b9ea9df9cbfdd497c68603b184d43448418fa2" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ && apk add --no-cache --virtual .fetch-deps \ curl \ ca-certificates \ diff --git a/24/slim/Dockerfile b/24/slim/Dockerfile index f3db1fd4..dc489b40 100644 --- a/24/slim/Dockerfile +++ b/24/slim/Dockerfile @@ -1,7 +1,7 @@ FROM debian:bullseye -ENV OTP_VERSION="24.3.4.15" \ - REBAR3_VERSION="3.20.0" +ENV OTP_VERSION="24.3.4.16" \ + REBAR3_VERSION="3.22.1" LABEL org.opencontainers.image.version=$OTP_VERSION @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.version=$OTP_VERSION # sure our final image contains only what we've just built: RUN set -xe \ && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && OTP_DOWNLOAD_SHA256="2c014720eb2d2da7f195e4c7ced20b6e9eed664b6d65e2083be9e698e63224df" \ + && OTP_DOWNLOAD_SHA256="f434c19d62b29ad8ef5300a490b9ea9df9cbfdd497c68603b184d43448418fa2" \ && fetchDeps=' \ curl \ ca-certificates' \ @@ -47,7 +47,7 @@ RUN set -xe \ && make install ) \ && find /usr/local -name examples | xargs rm -rf \ && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ - && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ && 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 - \ diff --git a/25/Dockerfile b/25/Dockerfile index e2516229..271c59ae 100644 --- a/25/Dockerfile +++ b/25/Dockerfile @@ -1,7 +1,7 @@ FROM buildpack-deps:bullseye -ENV OTP_VERSION="25.3.2.8" \ - REBAR3_VERSION="3.20.0" +ENV OTP_VERSION="25.3.2.9" \ + REBAR3_VERSION="3.22.1" LABEL org.opencontainers.image.version=$OTP_VERSION @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.version=$OTP_VERSION # build process: RUN set -xe \ && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && OTP_DOWNLOAD_SHA256="6b8a6dcfd294ee9d88e47721a6f897603532575329fea587240776c02b232d38" \ + && OTP_DOWNLOAD_SHA256="86fce5b418d127fb6049d69ecc1c32306128736d291e49077943cb3dcc73d7d5" \ && runtimeDeps='libodbc1 \ libsctp1 \ libwxgtk3.0 \ @@ -58,7 +58,7 @@ RUN set -xe \ RUN set -xe \ && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ - && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ && 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 - \ diff --git a/25/alpine/Dockerfile b/25/alpine/Dockerfile index bba3174b..bf1817e0 100644 --- a/25/alpine/Dockerfile +++ b/25/alpine/Dockerfile @@ -1,14 +1,14 @@ FROM alpine:3.18 -ENV OTP_VERSION="25.3.2.8" \ - REBAR3_VERSION="3.20.0" +ENV OTP_VERSION="25.3.2.9" \ + REBAR3_VERSION="3.22.1" LABEL org.opencontainers.image.version=$OTP_VERSION RUN set -xe \ && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && OTP_DOWNLOAD_SHA256="6b8a6dcfd294ee9d88e47721a6f897603532575329fea587240776c02b232d38" \ - && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" \ + && OTP_DOWNLOAD_SHA256="86fce5b418d127fb6049d69ecc1c32306128736d291e49077943cb3dcc73d7d5" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ && apk add --no-cache --virtual .fetch-deps \ curl \ ca-certificates \ diff --git a/25/slim/Dockerfile b/25/slim/Dockerfile index 10e56a29..9dc3f6ff 100644 --- a/25/slim/Dockerfile +++ b/25/slim/Dockerfile @@ -1,7 +1,7 @@ FROM debian:bullseye -ENV OTP_VERSION="25.3.2.8" \ - REBAR3_VERSION="3.20.0" +ENV OTP_VERSION="25.3.2.9" \ + REBAR3_VERSION="3.22.1" LABEL org.opencontainers.image.version=$OTP_VERSION @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.version=$OTP_VERSION # sure our final image contains only what we've just built: RUN set -xe \ && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && OTP_DOWNLOAD_SHA256="6b8a6dcfd294ee9d88e47721a6f897603532575329fea587240776c02b232d38" \ + && OTP_DOWNLOAD_SHA256="86fce5b418d127fb6049d69ecc1c32306128736d291e49077943cb3dcc73d7d5" \ && fetchDeps=' \ curl \ ca-certificates' \ @@ -47,7 +47,7 @@ RUN set -xe \ && make install ) \ && find /usr/local -name examples | xargs rm -rf \ && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ - && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ && 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 - \ diff --git a/26/Dockerfile b/26/Dockerfile index 19909209..401b6ff0 100644 --- a/26/Dockerfile +++ b/26/Dockerfile @@ -1,7 +1,7 @@ FROM buildpack-deps:bullseye -ENV OTP_VERSION="26.2.1" \ - REBAR3_VERSION="3.20.0" +ENV OTP_VERSION="26.2.2" \ + REBAR3_VERSION="3.22.1" LABEL org.opencontainers.image.version=$OTP_VERSION @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.version=$OTP_VERSION # build process: RUN set -xe \ && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && OTP_DOWNLOAD_SHA256="d99eab3af908b41dd4d7df38f0b02a447579326dd6604f641bbe9f2789b5656b" \ + && OTP_DOWNLOAD_SHA256="93c09aa8814018c23d218ac68b2bcdba188e12086223fbfa08af5cc70edd7ee1" \ && runtimeDeps='libodbc1 \ libsctp1 \ libwxgtk3.0 \ @@ -58,7 +58,7 @@ RUN set -xe \ RUN set -xe \ && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ - && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ && 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 - \ diff --git a/26/alpine/Dockerfile b/26/alpine/Dockerfile index 27f598f8..81cb3f14 100644 --- a/26/alpine/Dockerfile +++ b/26/alpine/Dockerfile @@ -1,14 +1,14 @@ FROM alpine:3.19 -ENV OTP_VERSION="26.2.1" \ - REBAR3_VERSION="3.20.0" +ENV OTP_VERSION="26.2.2" \ + REBAR3_VERSION="3.22.1" LABEL org.opencontainers.image.version=$OTP_VERSION RUN set -xe \ && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && OTP_DOWNLOAD_SHA256="d99eab3af908b41dd4d7df38f0b02a447579326dd6604f641bbe9f2789b5656b" \ - && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" \ + && OTP_DOWNLOAD_SHA256="93c09aa8814018c23d218ac68b2bcdba188e12086223fbfa08af5cc70edd7ee1" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ && apk add --no-cache --virtual .fetch-deps \ curl \ ca-certificates \ diff --git a/26/slim/Dockerfile b/26/slim/Dockerfile index e2f4590b..fdc3907c 100644 --- a/26/slim/Dockerfile +++ b/26/slim/Dockerfile @@ -1,7 +1,7 @@ FROM debian:bullseye -ENV OTP_VERSION="26.2.1" \ - REBAR3_VERSION="3.20.0" +ENV OTP_VERSION="26.2.2" \ + REBAR3_VERSION="3.22.1" LABEL org.opencontainers.image.version=$OTP_VERSION @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.version=$OTP_VERSION # sure our final image contains only what we've just built: RUN set -xe \ && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && OTP_DOWNLOAD_SHA256="d99eab3af908b41dd4d7df38f0b02a447579326dd6604f641bbe9f2789b5656b" \ + && OTP_DOWNLOAD_SHA256="93c09aa8814018c23d218ac68b2bcdba188e12086223fbfa08af5cc70edd7ee1" \ && fetchDeps=' \ curl \ ca-certificates' \ @@ -47,7 +47,7 @@ RUN set -xe \ && make install ) \ && find /usr/local -name examples | xargs rm -rf \ && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ - && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ && 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 - \ diff --git a/27/Dockerfile b/27/Dockerfile new file mode 100644 index 00000000..788f1936 --- /dev/null +++ b/27/Dockerfile @@ -0,0 +1,70 @@ +FROM buildpack-deps:bookworm + +ENV OTP_VERSION="27.0-rc1" \ + REBAR3_VERSION="3.22.1" + +LABEL org.opencontainers.image.version=$OTP_VERSION + +# We'll install the build dependencies for erlang-odbc along with the erlang +# build process: +RUN set -xe \ + && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ + && OTP_DOWNLOAD_SHA256="e543ec72fd55ae0a8e7094a37e305e4de24d5c1b97044723cd67b74a74bbd32c" \ + && runtimeDeps='libodbc1 \ + libsctp1 \ + libwxgtk3.0 \ + libwxgtk-webview3.0-gtk3-0v5' \ + && buildDeps='unixodbc-dev \ + libsctp-dev \ + libwxgtk-webview3.0-gtk3-dev' \ + && apt-get update \ + && apt-get install -y --no-install-recommends $runtimeDeps \ + && apt-get install -y --no-install-recommends $buildDeps \ + && 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 \ + && gnuArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" \ + && ./configure --build="$gnuArch" \ + && 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 $buildDeps \ + && rm -rf $ERL_TOP /var/lib/apt/lists/* + +CMD ["erl"] + +# extra useful tools here: rebar & rebar3 + +ENV REBAR_VERSION="2.6.4" + +RUN set -xe \ + && REBAR_DOWNLOAD_URL="https://github.com/rebar/rebar/archive/${REBAR_VERSION}.tar.gz" \ + && REBAR_DOWNLOAD_SHA256="577246bafa2eb2b2c3f1d0c157408650446884555bf87901508ce71d5cc0bd07" \ + && 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 + +RUN set -xe \ + && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ + && 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 diff --git a/27/alpine/Dockerfile b/27/alpine/Dockerfile new file mode 100644 index 00000000..5ae854e8 --- /dev/null +++ b/27/alpine/Dockerfile @@ -0,0 +1,68 @@ +FROM alpine:3.19 + +ENV OTP_VERSION="27.0-rc1" \ + REBAR3_VERSION="3.22.1" + +LABEL org.opencontainers.image.version=$OTP_VERSION + +RUN set -xe \ + && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ + && OTP_DOWNLOAD_SHA256="e543ec72fd55ae0a8e7094a37e305e4de24d5c1b97044723cd67b74a74bbd32c" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ + && apk add --no-cache --virtual .fetch-deps \ + curl \ + ca-certificates \ + && curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \ + && echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \ + && apk add --no-cache --virtual .build-deps \ + dpkg-dev dpkg \ + gcc \ + g++ \ + libc-dev \ + linux-headers \ + make \ + autoconf \ + ncurses-dev \ + openssl-dev \ + unixodbc-dev \ + lksctp-tools-dev \ + tar \ + && 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 \ + && gnuArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" \ + && ./configure --build="$gnuArch" \ + && 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 "so:" $1 }' \ + )" \ + && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ + && 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 \ + && apk add --virtual .erlang-rundeps \ + $runDeps \ + lksctp-tools \ + ca-certificates \ + && apk del .fetch-deps .build-deps + +CMD ["erl"] diff --git a/27/slim/Dockerfile b/27/slim/Dockerfile new file mode 100644 index 00000000..14991f8f --- /dev/null +++ b/27/slim/Dockerfile @@ -0,0 +1,63 @@ +FROM debian:bookworm + +ENV OTP_VERSION="27.0-rc1" \ + REBAR3_VERSION="3.22.1" + +LABEL org.opencontainers.image.version=$OTP_VERSION + +# We'll install the build dependencies, and purge them on the last step to make +# sure our final image contains only what we've just built: +RUN set -xe \ + && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ + && OTP_DOWNLOAD_SHA256="e543ec72fd55ae0a8e7094a37e305e4de24d5c1b97044723cd67b74a74bbd32c" \ + && fetchDeps=' \ + curl \ + ca-certificates' \ + && apt-get update \ + && apt-get install -y --no-install-recommends $fetchDeps \ + && curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \ + && echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \ + && runtimeDeps=' \ + libodbc1 \ + libssl3 \ + libsctp1 \ + ' \ + && buildDeps=' \ + autoconf \ + dpkg-dev \ + gcc \ + g++ \ + make \ + libncurses-dev \ + unixodbc-dev \ + libssl-dev \ + libsctp-dev \ + ' \ + && apt-get install -y --no-install-recommends $runtimeDeps \ + && apt-get install -y --no-install-recommends $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 \ + && gnuArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" \ + && ./configure --build="$gnuArch" \ + && make -j$(nproc) \ + && make install ) \ + && find /usr/local -name examples | xargs rm -rf \ + && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ + && REBAR3_DOWNLOAD_SHA256="2855b5784300865d2e43cb7a135cb2bba144cf15214c619065b918afc8cc6eb9" \ + && 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 \ + && apt-get purge -y --auto-remove $buildDeps $fetchDeps \ + && rm -rf $ERL_TOP /var/lib/apt/lists/* + +CMD ["erl"] diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index c0ef6bde..035c2b2b 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eu -declare -a -r versions=(26 25 24 23 22 21 20 ) +declare -a -r versions=(27 26 25 24 23 22 21 20 ) declare -A -r aliases=( [26]='latest' )