github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/docker/sawtooth-dev-poet-sgx (about) 1 # Copyright 2017 Intel Corporation 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 # ------------------------------------------------------------------------------ 15 16 # Description: 17 # Builds the environment needed to build poet_sgx. 18 # 19 # Build: 20 # $ cd sawtooth-core 21 # $ docker build . -f ci/sawtooth-dev-poet-sgx -t sawtooth-dev-poet-sgx 22 # 23 # Run: 24 # $ cd sawtooth-core 25 # $ docker run -v $(pwd):/project/sawtooth-core sawtooth-dev-poet-sgx 26 27 FROM ubuntu:xenial 28 29 # Add sawtooth repo 30 RUN echo "deb [arch=amd64] http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 31 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 32 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 33 && apt-get update \ 34 && apt-get install -y -q --allow-downgrades \ 35 build-essential \ 36 ca-certificates \ 37 cmake \ 38 dh-autoreconf \ 39 git \ 40 libcrypto++-dev \ 41 libjson-c-dev \ 42 make \ 43 python3-dev \ 44 python3-setuptools \ 45 python3-setuptools-scm=1.15.0-1 \ 46 software-properties-common \ 47 swig3.0 \ 48 unzip \ 49 wget \ 50 && apt-get clean \ 51 && rm -rf /var/lib/apt/lists/* 52 53 RUN ln -s /usr/bin/swig3.0 /usr/bin/swig 54 55 # Install SGX SDK for PoET 56 WORKDIR /tmp 57 58 RUN wget https://download.01.org/intel-sgx/linux-2.0/sgx_linux_ubuntu16.04.1_x64_sdk_2.0.100.40950.bin && \ 59 chmod +x sgx_linux_ubuntu16.04.1_x64_sdk_2.0.100.40950.bin && \ 60 echo "yes" | ./sgx_linux_ubuntu16.04.1_x64_sdk_2.0.100.40950.bin && \ 61 . /tmp/sgxsdk/environment && \ 62 export SGXSDKInstallPath=/tmp/sgxsdk/ 63 64 # Create mount point for source 65 WORKDIR /project/sawtooth-core 66 67 # Build sawtooth debs 68 ENV VERSION=AUTO_STRICT 69 ENTRYPOINT ["./bin/build_poet_sgx"]