| FROM centos:7 |
| |
| RUN yum install -y bzip2 ocaml ocaml-ocamlbuild wget python2 openssl-devel git protobuf-devel cmake libtool automake && \ |
| yum groupinstall -y "Development Tools" |
| |
| #ADD 01_gcc_8.sh /root |
| #RUN bash /root/01_gcc_8.sh |
| |
| RUN yum install -y centos-release-scl && \ |
| yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ zlib-devel flex bison texinfo && \ |
| mv /usr/bin/gcc /usr/bin/gcc.bak && \ |
| mv /usr/bin/g++ /usr/bin/g++.bak && \ |
| mv /usr/bin/c++ /usr/bin/c++.bak && \ |
| update-alternatives --install /usr/bin/gcc gcc /opt/rh/devtoolset-8/root/usr/bin/gcc 60 --slave /usr/bin/g++ g++ /opt/rh/devtoolset-8/root/usr/bin/g++ --slave /usr/bin/c++ c++ /opt/rh/devtoolset-8/root/usr/bin/c++ |
| |
| ENV BINUTILS_PREFIX=/opt/binutils |
| ENV LD_LIBRARY_PATH=/usr/lib |
| |
| ADD 02_binutils.sh /root |
| RUN bash /root/02_binutils.sh |
| |
| RUN cp -r $BINUTILS_PREFIX/bin/* /opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ |
| ENV LD_LIBRARY_PATH=$(BINUTILS_PREFIX) |
| |
| ADD 03_sdk.sh /root |
| RUN bash /root/03_sdk.sh |
| |
| # Sixth, PSW |
| |
| ENV PSW_REPO=https://download.01.org/intel-sgx/sgx-linux/2.9/distro/centos7.5-server/sgx_rpm_local_repo.tgz |
| |
| RUN curl --output /root/repo.tgz $PSW_REPO && \ |
| cd /root && \ |
| tar xzf repo.tgz && \ |
| cd sgx_rpm_local_repo && \ |
| rpm -ivh ./*.rpm && \ |
| cd /root && \ |
| rm -rf sgx_rpm_local_repo |
| |
| # Seventh, Rust |
| |
| ENV rust_toolchain nightly-2020-03-12 |
| ADD 05_rust.sh /root |
| RUN bash /root/05_rust.sh |
| |
| ENV rust_toolchain= |
| ENV CODENAME= |
| ENV VERSION= |
| ENV PSW_REPO= |
| |
| WORKDIR /root |