github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/sdk/examples/devmode_rust/Dockerfile (about) 1 # Copyright 2018 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 FROM ubuntu:xenial 17 18 RUN apt-get update \ 19 && apt-get install -y \ 20 curl \ 21 gcc \ 22 libssl-dev \ 23 libzmq3-dev \ 24 pkg-config \ 25 unzip 26 27 # For Building Protobufs 28 RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \ 29 && curl -OLsS https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip \ 30 && unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 \ 31 && rm protoc-3.5.1-linux-x86_64.zip 32 33 ENV PATH=$PATH:/project/sawtooth-core/bin:/protoc3/bin:/root/.cargo/bin \ 34 CARGO_INCREMENTAL=0 35 36 WORKDIR /project/sawtooth-core/ 37 38 CMD cd sdk/examples/devmode_rust \ 39 && echo "\033[0;32m--- Building sawtooth-devmode-rust ---\n\033[0m" \ 40 && rm -rf ./bin/ \ 41 && mkdir -p ./bin/ \ 42 && cargo build --release \ 43 && cp ./target/release/devmode-rust ./bin/devmode-rust