1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
9 FROM rockylinux:8.8-minimal as build_x86_64
13 ONBUILD ADD generated/go${GOVERSION}.linux-amd64.tar.gz /usr/local/
14 ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/
15 # Install nodejs and npm
16 ONBUILD ADD generated/node-v12.22.12-linux-x64.tar.xz /usr/local/
17 ONBUILD RUN ln -s /usr/local/node-v12.22.12-linux-x64/bin/* /usr/local/bin/
18 ONBUILD RUN npm install -g yarn
19 ONBUILD RUN ln -sf /usr/local/node-v12.22.12-linux-x64/bin/* /usr/local/bin/
21 FROM rockylinux:8.8-minimal as build_aarch64
25 ONBUILD ADD generated/go${GOVERSION}.linux-arm64.tar.gz /usr/local/
26 ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/
27 # Install nodejs and npm
28 ONBUILD ADD generated/node-v12.22.12-linux-arm64.tar.xz /usr/local/
29 ONBUILD RUN ln -s /usr/local/node-v12.22.12-linux-arm64/bin/* /usr/local/bin/
30 ONBUILD RUN npm install -g yarn
31 ONBUILD RUN ln -sf /usr/local/node-v12.22.12-linux-arm64/bin/* /usr/local/bin/
33 FROM build_${HOSTTYPE}
35 MAINTAINER Arvados Package Maintainers <packaging@arvados.org>
37 # Install dependencies.
38 RUN microdnf --assumeyes module enable ruby:3.1 \
39 && microdnf --assumeyes --enablerepo=devel install \
74 # fpm depends on dotenv, but version 3.0 of that gem dropped support for
75 # Ruby 2.7, so we need to specifically install an older version.
76 RUN echo "gem: --no-document" >> ~/.gemrc && \
77 gem install --conservative --version '>= 2.4.0' bundler && \
78 gem install dotenv --version '~> 2.8' && \
79 gem install fpm --version 1.15.1 && \
80 bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
82 # Cf. https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install/
83 ENV MAKE "make --jobs $(grep -c processor /proc/cpuinfo)"
85 # Preseed the go module cache.
86 RUN git clone git://git.arvados.org/arvados.git /tmp/arvados && \
88 if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \
91 ENV WORKSPACE /arvados
92 CMD ["bash", "/jenkins/run-build-packages.sh", "--target", "rocky8"]