github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/sdk/examples/devmode_rust/Dockerfile-installed (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 # -------------=== sawtooth devmode rust build ===------------- 17 FROM ubuntu:xenial as devmode-rust-builder 18 19 ENV VERSION=AUTO_STRICT 20 21 RUN apt-get update \ 22 && apt-get install -y \ 23 curl \ 24 gcc \ 25 libssl-dev \ 26 libzmq3-dev \ 27 pkg-config \ 28 unzip 29 30 # For Building Protobufs 31 RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \ 32 && curl -OLsS https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip \ 33 && unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 \ 34 && rm protoc-3.5.1-linux-x86_64.zip 35 36 ENV PATH=$PATH:/protoc3/bin 37 RUN /root/.cargo/bin/cargo install cargo-deb 38 39 COPY . /project 40 41 WORKDIR /project/sdk/examples/devmode_rust 42 43 RUN /root/.cargo/bin/cargo deb 44 45 # -------------=== devmode rust docker build ===------------- 46 FROM ubuntu:xenial 47 48 COPY --from=devmode-rust-builder /project/sdk/examples/devmode_rust/target/debian/sawtooth-devmode-rust_*.deb /tmp 49 50 RUN apt-get update \ 51 && dpkg -i /tmp/sawtooth-devmode-rust_*.deb || true \ 52 && apt-get -f -y install