Merge branch '16100-mime-types'
[arvados.git] / build / package-build-dockerfiles / centos7 / Dockerfile
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 FROM centos:7
6 MAINTAINER Arvados Package Maintainers <packaging@arvados.org>
7
8 # Install dependencies.
9 RUN yum -q -y install make automake gcc gcc-c++ libyaml-devel patch readline-devel zlib-devel libffi-devel openssl-devel bzip2 libtool bison sqlite-devel rpm-build git perl-ExtUtils-MakeMaker libattr-devel nss-devel libcurl-devel which tar unzip scl-utils centos-release-scl postgresql-devel python-devel python-setuptools fuse-devel xz-libs git python-virtualenv wget
10
11 # Install RVM
12 ADD generated/mpapis.asc /tmp/
13 ADD generated/pkuczynski.asc /tmp/
14 RUN gpg --import --no-tty /tmp/mpapis.asc && \
15     gpg --import --no-tty /tmp/pkuczynski.asc && \
16     curl -L https://get.rvm.io | bash -s stable && \
17     /usr/local/rvm/bin/rvm install 2.5 && \
18     /usr/local/rvm/bin/rvm alias create default ruby-2.5 && \
19     /usr/local/rvm/bin/rvm-exec default gem install bundler --version 2.0.2 && \
20     /usr/local/rvm/bin/rvm-exec default gem install fpm --version 1.10.2
21
22 # Install Bash 4.4.12 // see https://dev.arvados.org/issues/15612
23 RUN cd /usr/local/src \
24 && wget http://ftp.gnu.org/gnu/bash/bash-4.4.12.tar.gz \
25 && wget http://ftp.gnu.org/gnu/bash/bash-4.4.12.tar.gz.sig \
26 && tar xzf bash-4.4.12.tar.gz \
27 && cd bash-4.4.12 \
28 && ./configure --prefix=/usr/local/$( basename $( pwd ) ) \
29 && make \
30 && make install \
31 && ln -sf /usr/local/src/bash-4.4.12/bash /bin/bash
32
33 # Install golang binary
34 ADD generated/go1.13.4.linux-amd64.tar.gz /usr/local/
35 RUN ln -s /usr/local/go/bin/go /usr/local/bin/
36
37 # Install nodejs and npm
38 ADD generated/node-v6.11.2-linux-x64.tar.xz /usr/local/
39 RUN ln -s /usr/local/node-v6.11.2-linux-x64/bin/* /usr/local/bin/
40
41 # Need to "touch" RPM database to workaround bug in interaction between
42 # overlayfs and yum (https://bugzilla.redhat.com/show_bug.cgi?id=1213602)
43 RUN touch /var/lib/rpm/* && yum -q -y install rh-python36
44 RUN scl enable rh-python36 "easy_install-3.6 pip" && easy_install-2.7 pip
45
46 # Add epel, we need it for the python-pam dependency
47 RUN wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
48 RUN rpm -ivh epel-release-latest-7.noarch.rpm
49
50 RUN git clone --depth 1 git://git.arvados.org/arvados.git /tmp/arvados && cd /tmp/arvados/services/api && /usr/local/rvm/bin/rvm-exec default bundle && cd /tmp/arvados/apps/workbench && /usr/local/rvm/bin/rvm-exec default bundle
51
52 # The version of setuptools that comes with CentOS is way too old
53 RUN pip install --upgrade 'setuptools<45'
54
55 ENV WORKSPACE /arvados
56 CMD ["scl", "enable", "rh-python36", "/usr/local/rvm/bin/rvm-exec default bash /jenkins/run-build-packages.sh --target centos7"]