9162: Add keep-balance
[arvados.git] / build / package-build-dockerfiles / centos6 / Dockerfile
1 FROM centos:6
2 MAINTAINER Brett Smith <brett@curoverse.com>
3
4 # Install build dependencies provided in base distribution
5 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
6
7 # Install golang binary
8 ADD generated/go1.6.2.linux-amd64.tar.gz /usr/local/
9 RUN ln -s /usr/local/go/bin/go /usr/local/bin/
10
11 # Install RVM
12 RUN gpg --keyserver pool.sks-keyservers.net --recv-keys D39DC0E3 && \
13     curl -L https://get.rvm.io | bash -s stable && \
14     /usr/local/rvm/bin/rvm install 2.1 && \
15     /usr/local/rvm/bin/rvm alias create default ruby-2.1 && \
16     /usr/local/rvm/bin/rvm-exec default gem install bundler && \
17     /usr/local/rvm/bin/rvm-exec default gem install cure-fpm --version 1.6.0b
18
19 # Need to "touch" RPM database to workaround bug in interaction between
20 # overlayfs and yum (https://bugzilla.redhat.com/show_bug.cgi?id=1213602)
21 RUN touch /var/lib/rpm/* && yum -q -y install python27 python33
22 RUN scl enable python33 "easy_install-3.3 pip" && scl enable python27 "easy_install-2.7 pip"
23
24 # fpm requires ffi which now wants xz-libs-5 which isn't packaged for centos6
25 # but the library from xz-libs-4.999 appears to be good enough.
26 RUN ln -s /usr/lib64/liblzma.so.0 /usr/lib64/lzma.so.5
27
28 RUN cd /tmp && \
29     curl -OL 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm' && \
30     rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm && \
31     sed -i 's/enabled = 0/enabled = 1/' /etc/yum.repos.d/rpmforge.repo
32
33 RUN touch /var/lib/rpm/* && yum install --assumeyes git
34
35 ENV WORKSPACE /arvados
36 CMD ["scl", "enable", "python33", "python27", "/usr/local/rvm/bin/rvm-exec default bash /jenkins/run-build-packages.sh --target centos6"]