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

     1  # Copyright 2017 Intel Corporation
     2  # Copyright 2018 Cargill Incorporated
     3  #
     4  # Licensed under the Apache License, Version 2.0 (the "License");
     5  # you may not use this file except in compliance with the License.
     6  # You may obtain a copy of the License at
     7  #
     8  #     http://www.apache.org/licenses/LICENSE-2.0
     9  #
    10  # Unless required by applicable law or agreed to in writing, software
    11  # distributed under the License is distributed on an "AS IS" BASIS,
    12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  # See the License for the specific language governing permissions and
    14  # limitations under the License.
    15  # ------------------------------------------------------------------------------
    16  
    17  # Description:
    18  #   Builds an image to be used when developing in Python. The default CMD is to
    19  #   run build_python.
    20  #
    21  #   The image is also used by unit and integration tests. Docker is used to
    22  #   interact with and orchestrate the creation of other docker containers.
    23  #
    24  
    25  FROM ubuntu:xenial
    26  
    27  LABEL "install-type"="mounted"
    28  
    29   RUN echo "deb http://repo.sawtooth.me/ubuntu/1.0/stable xenial universe" >> /etc/apt/sources.list \
    30    && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \
    31   && apt-get update \
    32   && apt-get install -y -q \
    33      apt-transport-https \
    34      build-essential \
    35      ca-certificates \
    36      curl \
    37      git \
    38      inetutils-ping \
    39      libffi-dev \
    40      libssl-dev \
    41      pep8 \
    42      python3-cbor \
    43      python3-colorlog \
    44      python3-dev \
    45      python3-nose2 \
    46      python3-sawtooth-sdk \
    47      python3-pip \
    48      python3-protobuf \
    49      software-properties-common \
    50   && apt-get clean \
    51   && rm -rf /var/lib/apt/lists/* \
    52   && pip3 install \
    53      pylint \
    54      bandit \
    55      requests \
    56      coverage --upgrade
    57  
    58  RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
    59   && add-apt-repository \
    60     "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    61        $(lsb_release -cs) \
    62           stable"
    63  
    64  RUN apt-get update && apt-get install -y -q \
    65      docker-ce \
    66   && apt-get clean \
    67   && rm -rf /var/lib/apt/lists/*
    68  
    69  EXPOSE 4004/tcp
    70  EXPOSE 8080
    71  
    72  ENV PATH=$PATH:/project/sawtooth-supply-chain/bin
    73  
    74  WORKDIR /project/sawtooth-supply-chain
    75  CMD build_python