Dockerfile 2.64 KB
Newer Older
kladko's avatar
kladko committed
1 2 3 4
FROM ubuntu:bionic

WORKDIR /usr/src/sdk

kladko's avatar
kladko committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
COPY *.cpp ./
COPY *.h ./
COPY *.txt ./
COPY *.c ./
COPY *.am ./
COPY *.hpp ./
COPY *.sh ./
COPY *.m4 ./
COPY *.gmp ./
COPY *.ac ./
COPY *.json ./
COPY docker ./docker
COPY build-aux ./build-aux
COPY  cert ./cert
COPY intel-sgx-ssl ./intel-sgx-ssl
COPY jsonrpc ./jsonrpc
COPY leveldb ./leveldb
COPY libBLS ./libBLS
COPY m4 ./m4
COPY scripts ./scripts
COPY secure_enclave ./secure_enclave
COPY sgx-gmp ./sgx-gmp
COPY sgx-software-enable ./sgx-software-enable
COPY trusted_libff ./trusted_libff
RUN rm -rf /usr/src/sdk/leveldb/build/






36
RUN apt-get update && apt-get install -yq --no-install-recommends python-yaml vim telnet git ca-certificates build-essential ocaml ocamlbuild automake autoconf libtool wget python libssl-dev libssl-dev libcurl4-openssl-dev protobuf-compiler git libprotobuf-dev alien cmake debhelper uuid-dev libxml2-dev
37
RUN apt install -y libprotobuf10 yasm cmake flex bison  libprocps-dev ccache autoconf texinfo libssl-dev libboost-all-dev libjsonrpccpp-dev libjsonrpccpp-tools
38

kladko's avatar
kladko committed
39 40
COPY docker/install-psw.patch ./

kladko's avatar
kladko committed
41 42 43 44 45 46 47 48 49 50 51 52

RUN git clone -b sgx_2.5 --depth 1 https://github.com/intel/linux-sgx && \
    cd linux-sgx && \
    patch -p1 -i ../install-psw.patch && \
    ./download_prebuilt.sh 2> /dev/null && \
    make -s -j$(nproc) sdk_install_pkg psw_install_pkg && \
    ./linux/installer/bin/sgx_linux_x64_sdk_2.5.100.49891.bin --prefix=/opt/intel && \
    ./linux/installer/bin/sgx_linux_x64_psw_2.5.100.49891.bin && \
    cd .. && rm -rf linux-sgx/


# For debug purposes
kladko's avatar
kladko committed
53
# COPY docker/jhi.conf /etc/jhi/jhi.conf
kladko's avatar
kladko committed
54

55
###RUN git clone --recurse-submodules https://76b7983ebf14269178b99eff5b2be4b4b56fe7a5:@github.com/skalenetwork/sgxwallet.git
kladko's avatar
kladko committed
56 57
#RUN git clone --recurse-submodules https://76b7983ebf14269178b99eff5b2be4b4b56fe7a5:@github.com/skalenetwork/sgxwallet.git
#WORKDIR  sgxwallet
58
#RUN cd sgx-software-enable && make && ./sgx_enable
kladko's avatar
kladko committed
59 60

COPY configure.gmp ./
61 62 63
RUN cd scripts; ./build.py
### RUN autoreconf -vif
### RUN automake
64
RUN autoreconf -vif
65 66
RUN libtoolize --force
RUN aclocal
67
RUN autoheader || true
68 69
RUN automake --force-missing --add-missing
RUN autoconf
kladko's avatar
kladko committed
70
RUN ./configure
71
### RUN cd libBLS; cmake -H. -Bbuild; cmake --build build -- -j$(nproc);
kladko's avatar
kladko committed
72
RUN make
kladko's avatar
kladko committed
73 74 75 76 77 78
RUN wget --progress=dot:mega -O - https://github.com/intel/dynamic-application-loader-host-interface/archive/072d233296c15d0dcd1fb4570694d0244729f87b.tar.gz | tar -xz && \
    cd dynamic-application-loader-host-interface-072d233296c15d0dcd1fb4570694d0244729f87b && \
    cmake . -DCMAKE_BUILD_TYPE=Release -DINIT_SYSTEM=SysVinit && \
    make install && \
    cd .. && rm -rf dynamic-application-loader-host-interface-072d233296c15d0dcd1fb4570694d0244729f87b

kladko's avatar
kladko committed
79
COPY docker/start.sh ./