diff --git a/recipes/arm64-glibc-217/Dockerfile b/recipes/arm64-glibc-217/Dockerfile new file mode 100644 index 0000000..43f4ae7 --- /dev/null +++ b/recipes/arm64-glibc-217/Dockerfile @@ -0,0 +1,32 @@ +FROM centos:7 + +ARG GID=1000 +ARG UID=1000 + +RUN groupadd --gid $GID node \ + && adduser --gid $GID --uid $UID node + +COPY cloudlinux.repo /etc/yum.repos.d/cloudlinux.repo + +RUN yum install -y epel-release \ + && yum upgrade -y \ + && yum install -y \ + git \ + curl \ + make \ + python2 \ + python3 \ + ccache \ + xz-utils \ + devtoolset-9 \ + glibc-devel + +COPY --chown=node:node run.sh /home/node/run.sh + +VOLUME /home/node/.ccache +VOLUME /out +VOLUME /home/node/node.tar.xz + +USER node + +ENTRYPOINT [ "/home/node/run.sh" ] diff --git a/recipes/arm64-glibc-217/cloudlinux.repo b/recipes/arm64-glibc-217/cloudlinux.repo new file mode 100644 index 0000000..eb66532 --- /dev/null +++ b/recipes/arm64-glibc-217/cloudlinux.repo @@ -0,0 +1,4 @@ +[cloudlinux-sclo-devtoolset-9] +name=Cloudlinux devtoolset-9 +baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/aarch64/ +gpgcheck=0 diff --git a/recipes/arm64-glibc-217/run.sh b/recipes/arm64-glibc-217/run.sh new file mode 100755 index 0000000..bf963aa --- /dev/null +++ b/recipes/arm64-glibc-217/run.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +set -e +set -x + +release_urlbase="$1" +disttype="$2" +customtag="$3" +datestring="$4" +commit="$5" +fullversion="$6" +source_url="$7" +config_flags="" + +cd /home/node + +tar -xf node.tar.xz +cd "node-${fullversion}" + +export CC="ccache gcc" +export CXX="ccache g++" +export MAJOR_VERSION=$(echo ${fullversion} | cut -d . -f 1 | tr --delete v) + +. /opt/rh/devtoolset-9/enable + +make -j$(getconf _NPROCESSORS_ONLN) binary V= \ + DESTCPU="arm64" \ + ARCH="arm64" \ + VARIATION="glibc-217" \ + DISTTYPE="$disttype" \ + CUSTOMTAG="$customtag" \ + DATESTRING="$datestring" \ + COMMIT="$commit" \ + RELEASE_URLBASE="$release_urlbase" \ + CONFIG_FLAGS="$config_flags" + +mv node-*.tar.?z /out/ diff --git a/recipes/arm64-glibc-217/should-build.sh b/recipes/arm64-glibc-217/should-build.sh new file mode 100755 index 0000000..2453d49 --- /dev/null +++ b/recipes/arm64-glibc-217/should-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash -xe + +__dirname=$1 +fullversion=$2 + +. ${__dirname}/_decode_version.sh + +decode "$fullversion" + +test "$major" -ge "18"