Commit 764ac509 authored by Tru  HUYNH's avatar Tru HUYNH
Browse files

initial version

parent 1fcabff5
FROM centos:centos6
MAINTAINER Tru Huynh <tru@pasteur.fr>
# using local repositories instead of mirrors
# of course ymmv :D
# list of public mirrors: https://www.centos.org/download/mirrors/
# Institut Pasteur is at
# http://ftp.pasteur.fr/mirrors/CentOS/
RUN /bin/rm /etc/yum.repos.d/CentOS-*.repo
ADD https://gitlab.pasteur.fr/tru/centos-pasteur/raw/master/c6.repo /etc/yum.repos.d/local.repo
# update
RUN yum -y update && yum clean all
# install environment to build bazel
# adapted from https://github.com/bazelbuild/bazel/wiki/FAQ
# nice to see that they are using my old devtoolset-2
RUN yum -y install wget which findutils tar gzip zip unzip git zlib-devel
RUN yum -y install java-1.8.0-openjdk-devel
# one should really use the latest devtoolset-N from scl-rh
# to use newer gcc versions
# devtoolset-2-gcc.x86_64 4.8.2-15.el6 @devtools
# devtoolset-3-gcc.x86_64 4.9.2-6.2.el6 @centos-sclo-rh
# devtoolset-4-gcc.x86_64 5.3.1-6.1.el6 @centos-sclo-rh
# devtoolset-6-gcc.x86_64 6.2.1-3.1.el6 @centos-sclo-rh
RUN yum -y install centos-release-scl-rh
# use the local Pasteur repository for scl-rh too
RUN /bin/rm /etc/yum.repos.d/CentOS-*.repo
ADD https://gitlab.pasteur.fr/tru/centos-pasteur/raw/master/c6-scl-rh.repo /etc/yum.repos.d/scl-rh.repo
# use one of these
RUN yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++ devtoolset-3-binutils
#RUN yum -y install devtoolset-4-gcc devtoolset-4-gcc-c++ devtoolset-3-binutils
#RUN yum -y install devtoolset-3-gcc devtoolset-6-gcc-c++ devtoolset-3-binutils
# GPG key
RUN gpg --recv-key 48457EE0 ; gpg --recv-key 48457EE0
# yes twice, the 1st time, the config file are generated but not used
#gpg: directory `/root/.gnupg' created
#gpg: new configuration file `/root/.gnupg/gpg.conf' created
#gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
#gpg: keyring `/root/.gnupg/secring.gpg' created
#gpg: keyring `/root/.gnupg/pubring.gpg' created
#gpg: no keyserver known (use option --keyserver)
#gpg: keyserver receive failed: Syntax error in URI
# this does not work:
#--------------------
# ADD https://github.com/bazelbuild/bazel/releases/download/0.4.5/bazel-0.4.5-installer-linux-x86_64.sh /
# ADD https://github.com/bazelbuild/bazel/releases/download/0.4.5/bazel-0.4.5-installer-linux-x86_64.sh.sig /
# RUN gpg --verify bazel-0.4.5-installer-linux-x86_64.sh.sig && sh /bazel-0.4.5-installer-linux-x86_64.sh
#
# yields:
#--------
# bazel is now installed in /usr/local
# bash completion: source /usr/local/lib/bazel/bin/bazel-complete.bash
# but the provided bazel binary is not working..
# /usr/local/bin/bazel: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/bin/bazel)
# CentOS-6 glibc is glibc-2.12-1.xxxx
ADD https://github.com/bazelbuild/bazel/releases/download/0.4.5/bazel-0.4.5-dist.zip /
ADD https://github.com/bazelbuild/bazel/releases/download/0.4.5/bazel-0.4.5-dist.zip.sig /
RUN gpg --verify bazel-0.4.5-dist.zip.sig && unzip -d /tmp/bazel-0.4.5-dist bazel-0.4.5-dist.zip
# enable the new devtoolset
RUN echo 'cd /tmp/bazel-0.4.5-dist && bash ./compile.sh && cp output/bazel /usr/local/bin' | scl enable devtoolset-3 bash
# stop here if you only need bazel (to build tensorflow for instance)
# if you want to build the git version of bazel uncomment the following 2 lines.
#RUN git clone https://github.com/bazelbuild/bazel /tmp/bazel && \
# cd /tmp/bazel && bazel build //src:bazel && cp bazel-bin/src/bazel /usr/local/bin/bazel.new
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment