1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
9 FROM rockylinux:8.6-minimal as build_x86_64
12 ONBUILD ADD generated/go${GOVERSION}.linux-amd64.tar.gz /usr/local/
13 ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/
14 # Install nodejs and npm
15 ONBUILD ADD generated/node-v10.23.1-linux-x64.tar.xz /usr/local/
16 ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-x64/bin/* /usr/local/bin/
18 FROM rockylinux:8.6-minimal as build_aarch64
21 ONBUILD ADD generated/go${GOVERSION}.linux-arm64.tar.gz /usr/local/
22 ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/
23 # Install nodejs and npm
24 ONBUILD ADD generated/node-v10.23.1-linux-arm64.tar.xz /usr/local/
25 ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-arm64/bin/* /usr/local/bin/
27 FROM build_${HOSTTYPE}
29 MAINTAINER Arvados Package Maintainers <packaging@arvados.org>
31 # Install dependencies.
32 RUN microdnf --assumeyes --enablerepo=devel install \
68 ADD generated/mpapis.asc /tmp/
69 ADD generated/pkuczynski.asc /tmp/
70 RUN gpg --import --no-tty /tmp/mpapis.asc && \
71 gpg --import --no-tty /tmp/pkuczynski.asc && \
72 curl -L https://get.rvm.io | bash -s stable && \
73 /usr/local/rvm/bin/rvm install 2.7 -j $(grep -c processor /proc/cpuinfo) && \
74 /usr/local/rvm/bin/rvm alias create default ruby-2.7 && \
75 echo "gem: --no-document" >> ~/.gemrc && \
76 /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.2.19 && \
77 /usr/local/rvm/bin/rvm-exec default gem install fpm --version 1.10.2
79 RUN /usr/local/rvm/bin/rvm-exec default bundle config --global jobs $(let a=$(grep -c processor /proc/cpuinfo )-1; echo $a)
80 # Cf. https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install/
81 ENV MAKE "make --jobs $(grep -c processor /proc/cpuinfo)"
83 # Preseed the go module cache and the ruby gems, using the currently checked
84 # out branch of the source tree. This avoids potential compatibility issues
85 # between the version of Ruby and certain gems.
86 RUN git clone --depth 1 git://git.arvados.org/arvados.git /tmp/arvados && \
88 if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \
89 cd /tmp/arvados/services/api && \
90 /usr/local/rvm/bin/rvm-exec default bundle install && \
91 cd /tmp/arvados/apps/workbench && \
92 /usr/local/rvm/bin/rvm-exec default bundle install && \
96 ENV WORKSPACE /arvados
97 CMD ["/usr/local/rvm/bin/rvm-exec", "default", "bash", "/jenkins/run-build-packages.sh", "--target", "rocky8"]