Skip to content

Commit

Permalink
Constrain Ubuntu Noble builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmj committed Mar 31, 2024
1 parent ec86782 commit abb1b41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 3 additions & 0 deletions lib/bob/job/docker_checker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ defmodule Bob.Job.DockerChecker do
defp build_erlang_ref?("ubuntu", "jammy-" <> _, "OTP-" <> version),
do: build_openssl_3?(version)

defp build_erlang_ref?("ubuntu", "noble-" <> _, "OTP-" <> version),
do: build_openssl_3?(version)

defp build_erlang_ref?(_os, _os_version, _ref), do: true

defp build_erlang_ref?("arm64", "ubuntu", "trusty-" <> _, "OTP-17" <> _), do: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ ARG OS_VERSION

FROM ubuntu:${OS_VERSION} AS build

ARG ERLANG

RUN apt-get update
RUN apt-get -y --no-install-recommends install \
autoconf \
Expand All @@ -13,21 +11,23 @@ RUN apt-get -y --no-install-recommends install \
make \
libncurses-dev \
unixodbc-dev \
$(bash -c 'if [ "${ERLANG:0:1}" = "1" ]; then echo "libssl1.0-dev"; else echo "libssl-dev"; fi') \
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 bash -c 'if [ "${ERLANG:0:2}" -ge "23" ]; then make -j$(getconf _NPROCESSORS_ONLN) docs DOC_TARGETS=chunks; else true; fi'
RUN bash -c 'if [ "${ERLANG:0:2}" -ge "23" ]; then make -j$(getconf _NPROCESSORS_ONLN) install-docs DOC_TARGETS=chunks; else true; fi'
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
Expand All @@ -36,13 +36,11 @@ RUN scanelf --nobanner -E ET_DYN -BF '%F' --recursive /usr/local | xargs -r stri

FROM ubuntu:${OS_VERSION} AS final

ARG ERLANG

RUN apt-get update && \
apt-get -y --no-install-recommends install \
ca-certificates \
libodbc1 \
$(bash -c 'if [ "${ERLANG:0:1}" = "1" ]; then echo "libssl1.0.0"; else echo "libssl1.1"; fi') \
libodbc2 \
libssl3t64 \
libsctp1 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit abb1b41

Please sign in to comment.