github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/ci/sawtooth-test-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 # Tests locally built Sawtooth debs. 18 # 19 # Build: 20 # $ cd sawtooth-core 21 # $ docker build . -f ci/sawtooth-test-debs -t sawtooth-test-debs 22 # 23 # Run: 24 # $ cd sawtooth-core 25 # $ docker run -v $(pwd):/project/sawtooth-core sawtooth-test-debs 26 27 FROM ubuntu:xenial 28 29 RUN apt-get update && apt-get install -y -q \ 30 dpkg-dev \ 31 python3-pkg-resources \ 32 && apt-get clean \ 33 && rm -rf /var/lib/apt/lists/* 34 35 ARG host_pkg_dir=build/debs 36 ARG pkg_dir=/home/sawtooth/debs 37 38 RUN useradd -m -r -G sudo sawtooth && passwd -d sawtooth 39 RUN mkdir ${pkg_dir} 40 WORKDIR ${pkg_dir} 41 42 COPY ${host_pkg_dir}/*.deb ${pkg_dir}/ 43 44 RUN echo "deb file:${pkg_dir} ./" >> \ 45 /etc/apt/sources.list \ 46 && echo "deb [arch=amd64] http://repo.sawtooth.me/ubuntu/1.0/stable xenial universe" >> \ 47 /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 && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz \ 51 && apt-get update 52 53 RUN apt-get update && apt-get install -y -q --allow-unauthenticated \ 54 $(ls -1 . | grep sawtooth | sed 's|^\(python3-sawtooth-.*\)\_1.0.*$|\1|')