Skip to content
Merged
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
12 changes: 10 additions & 2 deletions lib/bob/job/docker_checker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,16 @@ defmodule Bob.Job.DockerChecker do
end

defp build_ubuntu_26?(erlang_version) do
erlang_version = parse_otp_ref(erlang_version)
erlang_version >= [26, 0]
dev_version? = String.contains?(erlang_version, "-")

# C23 compatibility (`bool` keyword)
case parse_otp_ref(erlang_version) do
[26, 0] ->
not dev_version?

version ->
version >= [26, 0]
end
end

defp parse_otp_ref("OTP-" <> version), do: parse_otp_ref(version)
Expand Down
14 changes: 11 additions & 3 deletions lib/bob/job/otp_checker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule Bob.Job.OTPChecker do
end

defp build_ubuntu_24?(erlang_version) do
dev_version? = length(String.split(erlang_version, "-")) > 1
dev_version? = String.contains?(erlang_version, "-")

# WX compatibility
case parse_otp_ref(erlang_version) do
Expand All @@ -48,8 +48,16 @@ defmodule Bob.Job.OTPChecker do
end

defp build_ubuntu_26?(erlang_version) do
erlang_version = parse_otp_ref(erlang_version)
erlang_version >= [26, 0]
dev_version? = String.contains?(erlang_version, "-")

# C23 compatibility (`bool` keyword)
case parse_otp_ref(erlang_version) do
[26, 0] ->
not dev_version?

version ->
version >= [26, 0]
end
end

defp parse_otp_ref(ref) do
Expand Down
50 changes: 50 additions & 0 deletions priv/scripts/docker/erlang-ubuntu-resolute.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
ARG OS_VERSION

FROM ubuntu:${OS_VERSION} AS build

RUN apt-get update
RUN apt-get -y --no-install-recommends install \
autoconf \
dpkg-dev \
gcc \
g++ \
make \
libncurses-dev \
unixodbc-dev \
libssl-dev \
libsctp-dev \
wget \
ca-certificates \
pax-utils

ARG ERLANG

RUN mkdir -p /OTP/subdir
RUN wget -nv "https://github.com/erlang/otp/archive/OTP-${ERLANG}.tar.gz" && tar -zxf "OTP-${ERLANG}.tar.gz" -C /OTP/subdir --strip-components=1
WORKDIR /OTP/subdir
RUN ./otp_build autoconf
RUN ./configure --with-ssl --enable-dirty-schedulers
RUN make -j$(getconf _NPROCESSORS_ONLN)
RUN make -j$(getconf _NPROCESSORS_ONLN) install
RUN make -j$(getconf _NPROCESSORS_ONLN) docs DOC_TARGETS=chunks
RUN make -j$(getconf _NPROCESSORS_ONLN) install-docs DOC_TARGETS=chunks
RUN find /usr/local -regex '/usr/local/lib/erlang/\(lib/\|erts-\).*/\(man\|obj\|c_src\|emacs\|info\|examples\)' | xargs rm -rf
RUN find /usr/local -name src | xargs -r find | grep -v '\.hrl$' | xargs rm -v || true
RUN find /usr/local -name src | xargs -r find | xargs rmdir -vp || true
RUN scanelf --nobanner -E ET_EXEC -BF '%F' --recursive /usr/local | xargs -r strip --strip-all
RUN scanelf --nobanner -E ET_DYN -BF '%F' --recursive /usr/local | xargs -r strip --strip-unneeded

FROM ubuntu:${OS_VERSION} AS final

RUN apt-get update; \
apt-get -y --no-install-recommends install \
ca-certificates \
libodbc2 \
libssl3t64 \
libsctp1 \
netbase; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*

COPY --from=build /usr/local /usr/local
ENV LANG=C.UTF-8
Loading