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
26 changes: 9 additions & 17 deletions recipes/x64-glibc-217/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,16 @@ ARG UID=1000
RUN groupadd --gid $GID node \
&& adduser --gid $GID --uid $UID node

RUN cat <<EOF | tee -a /etc/yum.repos.d/devtoolset-12.repo
[devtoolset-12]
name=Devtoolset 12
baseurl=https://buildlogs.centos.org/c7-devtoolset-12.x86_64/
enabled=1
gpgcheck=0
EOF

RUN ulimit -n 1024 \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& yum install -y epel-release \
&& yum install -y centos-release-scl-rh \
&& sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo \
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo \
&& yum upgrade -y \
&& yum install -y \
git \
curl \
make \
python2 \
rh-python38 \
ccache \
xz-utils \
devtoolset-12 \
glibc-devel
ccache

COPY --chown=node:node run.sh /home/node/run.sh

Expand All @@ -41,4 +25,12 @@ VOLUME /home/node/node.tar.xz

USER node

ENV PATH="/home/node/.local/bin:${PATH}"

RUN curl -L micro.mamba.pm/install.sh | bash -s -- -y \
&& eval "$(micromamba shell hook --shell bash)" \
&& micromamba install -y \
python=3.12 \
gxx=15

ENTRYPOINT [ "/home/node/run.sh" ]
16 changes: 10 additions & 6 deletions recipes/x64-glibc-217/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ cd /home/node

tar -xf node.tar.xz

nodeDir="/home/node/node-${fullversion}"

# configuring cares correctly to not use sys/random.h on this target
cd "node-${fullversion}"/deps/cares
cd "${nodeDir}"/deps/cares
sed -i 's/define HAVE_SYS_RANDOM_H 1/undef HAVE_SYS_RANDOM_H/g' ./config/linux/ares_config.h
sed -i 's/define HAVE_GETRANDOM 1/undef HAVE_GETRANDOM/g' ./config/linux/ares_config.h

Expand All @@ -27,17 +29,19 @@ if [[ "$(grep -o 'ARES_VERSION_STR "[^"]*"' ./include/ares_version.h | awk '{pri
sed -i 's/MSG_FASTOPEN/TCP_FASTOPEN_CONNECT/g' ./src/lib/ares__socket.c
fi

cd /home/node
# Linux implementation of experimental WASM memory control requires Linux 3.17 & glibc 2.27 so disable it
cd "${nodeDir}"/deps/v8/src
[ -f d8/d8.cc ] && sed -i -e 's/#if V8_TARGET_OS_LINUX/#if false/g' wasm/wasm-objects.cc d8/d8.cc

cd "node-${fullversion}"
cd "${nodeDir}"

eval "$(micromamba shell hook --shell bash)"
micromamba activate

export CC="ccache gcc"
export CXX="ccache g++"
export MAJOR_VERSION=$(echo ${fullversion} | cut -d . -f 1 | tr --delete v)

. /opt/rh/devtoolset-12/enable
. /opt/rh/rh-python38/enable

make -j$(getconf _NPROCESSORS_ONLN) binary V= \
DESTCPU="x64" \
ARCH="x64" \
Expand Down
2 changes: 1 addition & 1 deletion recipes/x64-glibc-217/should-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ fullversion=$2

decode "$fullversion"

test "$major" -ge "18" && test "$major" -lt "24"
test "$major" -ge "18"