1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 FROM node:12.22.12-bullseye
6 LABEL maintainer="Arvados Package Maintainers <packaging@arvados.org>"
8 RUN echo deb http://deb.debian.org/debian bullseye-backports main >> /etc/apt/sources.list.d/backports.list
9 RUN apt-get update && \
10 apt-get -yq --no-install-recommends -o Acquire::Retries=6 install \
11 libsecret-1-0 libsecret-1-dev rpm ruby ruby-dev rubygems build-essential \
12 libpam0g-dev libgbm1 git && \
15 RUN /usr/bin/gem install --no-document fpm
16 WORKDIR /usr/src/arvados
18 RUN cd /usr/src/arvados && \
19 test -d cmd/arvados-server || \
20 (echo "ERROR: build context must be an Arvados repository" && false) && \
21 GO_VERSION=$(grep 'goversion =' lib/install/deps.go |awk -F'"' '{print $2}') && \
22 ARCH=$(dpkg --print-architecture) && \
25 wget https://golang.org/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz && \
26 tar xzf go${GO_VERSION}.linux-${ARCH}.tar.gz && \
27 ln -s /usr/src/go/bin/go /usr/local/bin/go-${GO_VERSION} && \
28 ln -s /usr/src/go/bin/gofmt /usr/local/bin/gofmt-${GO_VERSION} && \
29 ln -s /usr/local/bin/go-${GO_VERSION} /usr/local/bin/go && \
30 ln -s /usr/local/bin/gofmt-${GO_VERSION} /usr/local/bin/gofmt
32 # preseed arvados build dependencies
33 RUN cd /usr/src/arvados && \
36 go run ./cmd/arvados-server install -type test && cd .. && \
40 RUN git config --global --add safe.directory /usr/src/arvados