X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f7bf9d69603db2d500563648460e2a96524de266..ae92d144610446849eb568247a44f02ae985c281:/build/package-build-dockerfiles/ubuntu1804/Dockerfile diff --git a/build/package-build-dockerfiles/ubuntu1804/Dockerfile b/build/package-build-dockerfiles/ubuntu1804/Dockerfile index b026fa2a88..80a98aada8 100644 --- a/build/package-build-dockerfiles/ubuntu1804/Dockerfile +++ b/build/package-build-dockerfiles/ubuntu1804/Dockerfile @@ -3,10 +3,13 @@ # SPDX-License-Identifier: AGPL-3.0 ARG HOSTTYPE +ARG BRANCH +ARG GOVERSION FROM ubuntu:bionic as build_x86_64 # Install go -ONBUILD ADD generated/go1.17.1.linux-amd64.tar.gz /usr/local/ +ONBUILD ARG GOVERSION +ONBUILD ADD generated/go${GOVERSION}.linux-amd64.tar.gz /usr/local/ ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/ # Install nodejs and npm ONBUILD ADD generated/node-v10.23.1-linux-x64.tar.xz /usr/local/ @@ -15,7 +18,8 @@ ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-x64/bin/* /usr/local/bin/ FROM ubuntu:bionic as build_aarch64 # Install go -ONBUILD ADD generated/go1.17.1.linux-arm64.tar.gz /usr/local/ +ONBUILD ARG GOVERSION +ONBUILD ADD generated/go${GOVERSION}.linux-arm64.tar.gz /usr/local/ ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/ # Install nodejs and npm ONBUILD ADD generated/node-v10.23.1-linux-arm64.tar.xz /usr/local/ @@ -50,7 +54,12 @@ RUN /usr/local/rvm/bin/rvm-exec default bundle config --global jobs $(let a=$(gr # Cf. https://build.betterup.com/one-weird-trick-that-will-speed-up-your-bundle-install/ ENV MAKE "make --jobs $(grep -c processor /proc/cpuinfo)" +# Preseed the go module cache and the ruby gems, using the currently checked +# out branch of the source tree. This avoids potential compatibility issues +# between the version of Ruby and certain gems. RUN git clone --depth 1 git://git.arvados.org/arvados.git /tmp/arvados && \ + cd /tmp/arvados && \ + if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \ cd /tmp/arvados/services/api && \ /usr/local/rvm/bin/rvm-exec default bundle install && \ cd /tmp/arvados/apps/workbench && \