|
| 1 | +FROM ubuntu:18.04 |
| 2 | + |
| 3 | +LABEL author="xiaobo <peterwillcn@gmail.com>" maintainer="Xiaobo <peterwillcn@gmail.com> Huang-Ming Huang <huangh@objectcomputing.com>" version="0.1.1" \ |
| 4 | + description="This is a base image for building eosio/eos" |
| 5 | + |
| 6 | +RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \ |
| 7 | + && echo 'APT::Install-Suggests 0;' >> /etc/apt/apt.conf.d/01norecommends \ |
| 8 | + && apt-get update \ |
| 9 | + && DEBIAN_FRONTEND=noninteractive apt-get install -y sudo wget curl net-tools ca-certificates unzip gnupg |
| 10 | + |
| 11 | +RUN echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" >> /etc/apt/sources.list.d/llvm.list \ |
| 12 | + && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - \ |
| 13 | + && apt-get update \ |
| 14 | + && DEBIAN_FRONTEND=noninteractive apt-get install -y git-core automake autoconf libtool build-essential pkg-config libtool \ |
| 15 | + mpi-default-dev libicu-dev python-dev python3-dev libbz2-dev zlib1g-dev libssl-dev libgmp-dev \ |
| 16 | + clang-4.0 lldb-4.0 lld-4.0 llvm-4.0-dev libclang-4.0-dev ninja-build \ |
| 17 | + && rm -rf /var/lib/apt/lists/* |
| 18 | + |
| 19 | +RUN update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-4.0/bin/clang 400 \ |
| 20 | + && update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-4.0/bin/clang++ 400 |
| 21 | + |
| 22 | +RUN wget https://cmake.org/files/v3.9/cmake-3.9.6-Linux-x86_64.sh \ |
| 23 | + && bash cmake-3.9.6-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license \ |
| 24 | + && rm cmake-3.9.6-Linux-x86_64.sh |
| 25 | + |
| 26 | +ENV CC clang |
| 27 | +ENV CXX clang++ |
| 28 | + |
| 29 | +RUN wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2 -O - | tar -xj \ |
| 30 | + && cd boost_1_67_0 \ |
| 31 | + && ./bootstrap.sh --prefix=/usr/local \ |
| 32 | + && echo 'using clang : 4.0 : clang++-4.0 ;' >> project-config.jam \ |
| 33 | + && ./b2 -d0 -j$(nproc) --with-thread --with-date_time --with-system --with-filesystem --with-program_options \ |
| 34 | + --with-signals --with-serialization --with-chrono --with-test --with-context --with-locale --with-coroutine --with-iostreams toolset=clang link=static install \ |
| 35 | + && cd .. && rm -rf boost_1_67_0 |
| 36 | + |
| 37 | +RUN wget https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz -O - | tar -xz \ |
| 38 | + && cd mongo-c-driver-1.9.3 \ |
| 39 | + && ./configure --enable-static --with-libbson=bundled --enable-ssl=openssl --disable-automatic-init-and-cleanup --prefix=/usr/local \ |
| 40 | + && make -j$(nproc) install \ |
| 41 | + && cd .. && rm -rf mongo-c-driver-1.9.3 |
| 42 | + |
| 43 | +RUN git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git \ |
| 44 | + && git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git llvm/tools/clang \ |
| 45 | + && cd llvm \ |
| 46 | + && cmake -H. -Bbuild -GNinja -DCMAKE_INSTALL_PREFIX=/opt/wasm -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release \ |
| 47 | + && cmake --build build --target install \ |
| 48 | + && cd .. && rm -rf llvm |
| 49 | + |
| 50 | +RUN wget https://github.com/WebAssembly/binaryen/archive/1.37.21.tar.gz -O - | tar -xz \ |
| 51 | + && cd binaryen-1.37.21 \ |
| 52 | + && cmake -H. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release \ |
| 53 | + && cmake --build build --target install \ |
| 54 | + && cd .. && rm -rf binaryen-1.37.21 |
| 55 | + |
| 56 | +RUN git clone --depth 1 https://github.com/cryptonomex/secp256k1-zkp \ |
| 57 | + && cd secp256k1-zkp \ |
| 58 | + && ./autogen.sh \ |
| 59 | + && ./configure --prefix=/usr/local \ |
| 60 | + && make -j$(nproc) install \ |
| 61 | + && cd .. && rm -rf secp256k1-zkp |
| 62 | + |
| 63 | +RUN git clone --depth 1 -b releases/stable https://github.com/mongodb/mongo-cxx-driver \ |
| 64 | + && cd mongo-cxx-driver \ |
| 65 | + && cmake -H. -Bbuild -G Ninja -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local\ |
| 66 | + && cmake --build build --target install \ |
| 67 | + && cd .. && rm -rf mongo-cxx-driver |
| 68 | + |
| 69 | +RUN git clone --depth 1 --single-branch --branch master https://github.com/ucb-bar/berkeley-softfloat-3.git \ |
| 70 | + && cd berkeley-softfloat-3/build/Linux-x86_64-GCC \ |
| 71 | + && make -j${nproc} SPECIALIZE_TYPE="8086-SSE" SOFTFLOAT_OPS="-DSOFTFLOAT_ROUND_EVEN -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32" \ |
| 72 | + && mkdir -p /opt/berkeley-softfloat-3 && cp softfloat.a /opt/berkeley-softfloat-3/libsoftfloat.a \ |
| 73 | + && mv ../../source/include /opt/berkeley-softfloat-3/include && cd - && rm -rf berkeley-softfloat-3 |
| 74 | + |
| 75 | +ENV SOFTFLOAT_ROOT /opt/berkeley-softfloat-3 |
0 commit comments