github.com/swiftstack/ProxyFS@v0.0.0-20210203235616-4017c267d62f/test/container/Dockerfile (about)

     1  # Copyright (c) 2015-2021, NVIDIA CORPORATION.
     2  # SPDX-License-Identifier: Apache-2.0
     3  
     4  FROM centos:7.4.1708
     5  
     6  # Yum install. Trying to do as much as possible at once.
     7  # Here's an explanation of why we need to install each package:
     8  ## Install Golang
     9  # -  gcc
    10  # -  wget
    11  ## Install Python pip
    12  # -  epel-release
    13  # -  python-pip
    14  ## Setup ProxyFS build environment
    15  # -  sudo
    16  # -  json-c-devel
    17  # -  fuse
    18  ## Setup Samba
    19  # -  git \
    20  # -  gcc-c++-4.8.5-16.el7_4.2 \
    21  # -  python-devel-2.7.5-58.el7 \
    22  # -  gnutls-devel-3.3.26-9.el7 \
    23  # -  libacl-devel-2.2.51-12.el7 \
    24  # -  openldap-devel-2.4.44-5.el7 \
    25  # -  samba-4.6.2-12.el7_4 \
    26  # -  samba-client-4.6.2-12.el7_4 \
    27  # -  cifs-utils-6.2-10.el7 \
    28  ## Build liberasurecode and pyeclib from source
    29  # - gcc
    30  # - make
    31  # - autoconf
    32  # - automake
    33  # - libtool
    34  
    35  RUN yum-config-manager --disable CentOS-Base
    36  RUN yum-config-manager --disable CentOS-CR
    37  RUN yum-config-manager --disable CentOS-Debuginfo
    38  RUN yum-config-manager --disable CentOS-fasttrack
    39  RUN yum-config-manager --disable CentOS-Media
    40  RUN yum-config-manager --disable CentOS-Sources
    41  RUN yum-config-manager --disable CentOS-Vault
    42  
    43  RUN rm -rf \
    44      /etc/yum.repos.d/CentOS-Base.repo \
    45      /etc/yum.repos.d/CentOS-CR.repo \
    46      /etc/yum.repos.d/CentOS-Debuginfo.repo \
    47      /etc/yum.repos.d/CentOS-fasttrack.repo \
    48      /etc/yum.repos.d/CentOS-Media.repo \
    49      /etc/yum.repos.d/CentOS-Sources.repo \
    50      /etc/yum.repos.d/CentOS-Vault.repo
    51  
    52  RUN yum-config-manager --add-repo http://vault.centos.org/centos/7.4.1708/os/x86_64/
    53  RUN yum-config-manager --add-repo http://vault.centos.org/centos/7.4.1708/updates/x86_64/
    54  RUN yum-config-manager --add-repo http://vault.centos.org/centos/7.4.1708/extras/x86_64/
    55  RUN yum-config-manager --add-repo http://vault.centos.org/centos/7.4.1708/centosplus/x86_64/
    56  RUN yum-config-manager --enable vault.centos.org_centos_7.4.1708_os_x86_64_
    57  RUN yum-config-manager --enable vault.centos.org_centos_7.4.1708_updates_x86_64_
    58  RUN yum-config-manager --enable vault.centos.org_centos_7.4.1708_extras_x86_64_
    59  RUN yum-config-manager --enable vault.centos.org_centos_7.4.1708_centosplus_x86_64_
    60  
    61  RUN yum clean all
    62  RUN rm -rf /var/cache/yum
    63  
    64  RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    65  
    66  # goveralls needs a more recent version of git than what comes with CentOS 7
    67  RUN yum -y remove git*
    68  RUN yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.8-1.x86_64.rpm
    69  RUN yum -y install git
    70  RUN git --version
    71  
    72  RUN yum -y --disableexcludes=all install gcc
    73  RUN yum -y install \
    74      wget \
    75      epel-release \
    76      sudo \
    77      json-c-devel \
    78      fuse \
    79      gcc-c++-4.8.5-16.el7_4.2 \
    80      python-devel-2.7.5-58.el7 \
    81      gnutls-devel-3.3.26-9.el7 \
    82      libacl-devel-2.2.51-12.el7 \
    83      openldap-devel-2.4.44-5.el7 \
    84      samba-4.6.2-12.el7_4 \
    85      samba-client-4.6.2-12.el7_4 \
    86      cifs-utils-6.2-10.el7 \
    87      gcc-4.8.5-16.el7_4.2 \
    88      make-3.82-23.el7 \
    89      autoconf-2.69-11.el7 \
    90      automake-1.13.4-3.el7 \
    91      libtool-2.4.2-22.el7_3
    92  RUN yum -y install python-pip
    93  
    94  # Get a py3 runtime
    95  RUN yum -y install centos-release-scl
    96  RUN yum -y install rh-python36 && \
    97      ln -s /opt/rh/rh-python36/root/bin/python3.6 /bin/python3.6 && \
    98      ln -s /bin/python3.6 /bin/python3 && \
    99      ln -s /opt/rh/rh-python36/root/usr/include /opt/rh/rh-python36/root/include
   100  
   101  # Pip install. Trying to do as much as possible at once.
   102  # Here's an explanation of why we need to install each package:
   103  ## Setup ProxyFS build environment
   104  # - requests
   105  ## Install Python tox
   106  # - tox
   107  RUN pip install --upgrade pip
   108  RUN pip install requests tox==3.5.3
   109  
   110  # Install Golang
   111  ENV GOLANG_TARFILE_NAME=go1.15.5.linux-amd64.tar.gz
   112  RUN cd /tmp && wget -q https://dl.google.com/go/${GOLANG_TARFILE_NAME}
   113  RUN tar -C /usr/local -xf /tmp/${GOLANG_TARFILE_NAME}
   114  RUN rm -rf /tmp/${GOLANG_TARFILE_NAME}
   115  ENV PATH=$PATH:/usr/local/go/bin
   116  
   117  # Setup ProxyFS build environment
   118  ENV GOPATH=/gopathroot
   119  ENV PATH=$PATH:$GOPATH/bin
   120  RUN echo "user_allow_other" >> /etc/fuse.conf
   121  
   122  RUN git clone https://github.com/openstack/liberasurecode.git
   123  RUN cd /liberasurecode && ./autogen.sh && ./configure && make && sudo make install && sed -i '1s/^/\/usr\/local\/lib\n/' /etc/ld.so.conf && ldconfig
   124  
   125  RUN git clone https://github.com/openstack/pyeclib.git
   126  RUN cd /pyeclib && pip install -e . && pip install -r test-requirements.txt
   127  
   128  RUN go get github.com/ory/go-acc github.com/mattn/goveralls
   129  
   130  CMD ["/bin/bash", "/gopathroot/src/github.com/swiftstack/ProxyFS/test/container/launch.sh"]