github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-supply-chain-master/processor/Dockerfile (about)

     1  # Copyright 2018 Cargill Incorporated
     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  FROM rust:1
    16  
    17  RUN apt-get update && apt-get install -y unzip libzmq3-dev
    18  
    19  # For Building Protobufs
    20  RUN curl -OLsS https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip \
    21   && unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 \
    22   && rm protoc-3.5.1-linux-x86_64.zip
    23  RUN apt-get update && apt-get install -y protobuf-compiler
    24  
    25  # Build TP with dummy source in order to cache dependencies in Docker image.
    26  # Make sure not to use the `volumes` command to overwrite:
    27  #   - /sawtooth-supply-chain/processor/target/
    28  #   - /sawtooth-supply-chain/processor/src/messages/
    29  WORKDIR /sawtooth-supply-chain
    30  RUN USER=root cargo new --bin processor
    31  
    32  WORKDIR /sawtooth-supply-chain/processor
    33  COPY Cargo.toml Cargo.lock* ./
    34  RUN cargo build
    35  
    36  ENV PATH=$PATH:/sawtooth-supply-chain/processor/target/debug/
    37  
    38  ENTRYPOINT ["/sawtooth-supply-chain/processor/target/debug/supply-chain-tp"]