github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/ci/sawtooth-build-debs (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 create the Sawtooth python3 debs. 18 # Running the image will put the Sawtooth debs in 19 # sawtooth-core/build/debs on your local machine. 20 # 21 # Build: 22 # $ cd sawtooth-core 23 # $ docker build . -f ci/sawtooth-build-debs -t sawtooth-build-debs 24 # 25 # Run: 26 # $ cd sawtooth-core 27 # $ docker run -v $(pwd):/project/sawtooth-core sawtooth-build-debs 28 29 FROM ubuntu:xenial 30 31 # Add additional xenial repos 32 RUN sh -c "echo deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse >> /etc/apt/sources.list" && \ 33 sh -c "echo deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse >> /etc/apt/sources.list" 34 35 # Create build directories 36 RUN mkdir -p /home/build/packages && mkdir -p /home/build/projects 37 ENV build_dir=/home/build/projects pkg_dir=/home/build/packages 38 39 # Install build deps 40 COPY install_packaging_deps /home/build/install_packaging_deps 41 RUN apt-get update \ 42 && /home/build/install_packaging_deps \ 43 && apt-get clean \ 44 && rm -rf /var/lib/apt/lists/* 45 46 # Add sawtooth repo 47 RUN echo "deb [arch=amd64] http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 48 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 49 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 50 && apt-get update \ 51 && apt-get install -y -q --allow-downgrades \ 52 build-essential \ 53 ca-certificates \ 54 cmake \ 55 dh-autoreconf \ 56 libcrypto++-dev \ 57 libjson-c-dev \ 58 make \ 59 python3-aiodns=1.1.1-1 \ 60 python3-aiohttp=1.3.5-1 \ 61 python3-async-timeout=1.2.0-1 \ 62 python3-bitcoin=1.1.42-1 \ 63 python3-cchardet=2.0a3-1 \ 64 python3-cryptography-vectors=1.7.2-1 \ 65 python3-cryptography=1.7.2-1 \ 66 python3-grpcio-tools=1.1.3-1 \ 67 python3-grpcio=1.1.3-1 \ 68 python3-lmdb=0.92-1 \ 69 python3-multidict=2.1.4-1 \ 70 python3-netifaces=0.10.4-0.1build2 \ 71 python3-pyformance \ 72 python3-pip \ 73 python3-protobuf \ 74 python3-pycares=2.1.1-1 \ 75 python3-pytest-runner=2.6.2-1 \ 76 python3-pytest=2.9.0-1 \ 77 python3-pytz=2016.10-1 \ 78 python3-secp256k1=0.13.2-1 \ 79 python3-setuptools-scm=1.15.0-1 \ 80 python3-six=1.10.0-1 \ 81 python3-yarl=0.10.0-1 \ 82 software-properties-common \ 83 swig3.0 \ 84 unzip \ 85 wget \ 86 && apt-get clean \ 87 && rm -rf /var/lib/apt/lists/* \ 88 && pip3 install mock 89 90 RUN ln -s /usr/bin/swig3.0 /usr/bin/swig 91 92 # Install SGX SDK for PoET 93 WORKDIR /tmp 94 95 RUN wget https://download.01.org/intel-sgx/linux-2.0/sgx_linux_ubuntu16.04.1_x64_sdk_2.0.100.40950.bin && \ 96 chmod +x sgx_linux_ubuntu16.04.1_x64_sdk_2.0.100.40950.bin && \ 97 echo "yes" | ./sgx_linux_ubuntu16.04.1_x64_sdk_2.0.100.40950.bin && \ 98 . /tmp/sgxsdk/environment && \ 99 export SGXSDKInstallPath=/tmp/sgxsdk/ 100 101 # Create mount point for source 102 WORKDIR /project/sawtooth-core 103 104 # Build sawtooth debs 105 ENV VERSION=AUTO_STRICT 106 ENTRYPOINT ["./bin/build_debs"]