github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/sdk/examples/xo_rust/Dockerfile (about)

     1  # Copyright 2018 Bitwise IO, Inc.
     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  # docker build -f sdk/examples/xo_rust/Dockerfile -t sawtooth-xo-tp-rust-local .
    16  
    17  FROM ubuntu:xenial
    18  
    19  RUN apt-get update \
    20   && apt-get install -y \
    21   curl \
    22   gcc \
    23   libssl-dev \
    24   libzmq3-dev \
    25   pkg-config \
    26   unzip
    27  
    28  # For Building Protobufs
    29  RUN 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  RUN curl https://sh.rustup.rs -sSf > /usr/bin/rustup-init \
    34   && chmod +x /usr/bin/rustup-init \
    35   && rustup-init -y
    36  
    37  ENV PATH=$PATH:/project/sawtooth-core/bin:/protoc3/bin:/root/.cargo/bin \
    38      CARGO_INCREMENTAL=0
    39  
    40  WORKDIR /project/sawtooth-core/
    41  
    42  CMD cd sdk/examples/xo_rust \
    43   && echo "\033[0;32m--- Building xo-tp-rust ---\n\033[0m" \
    44   && rm -rf ./bin/ \
    45   && mkdir -p ./bin/ \
    46   && cargo build --release \
    47   && cp ./target/release/xo_rust ./bin/xo_rust