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

     1  # Copyright 2017 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  # Description:
    17  #   Builds an image to be used when developing in Python. The default CMD is to
    18  #   run build_python.
    19  #
    20  #   The image is also used by unit and integration tests. Docker is used to
    21  #   interact with and orchestrate the creation of other docker containers.
    22  #
    23  # Build:
    24  #   $ cd sawtooth-core/docker
    25  #   $ docker build . -f sawtooth-dev-python -t sawtooth-dev-python
    26  #
    27  # Run:
    28  #   $ cd sawtooth-core
    29  #   $ docker run -v $(pwd):/project/sawtooth-core \
    30  #     -v /var/run/docker.sock:/var/run/docker.sock sawtooth-dev-python
    31  
    32  FROM ubuntu:xenial
    33  
    34  LABEL "install-type"="mounted"
    35  
    36  RUN echo "deb [arch=amd64] http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \
    37   && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \
    38   || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \
    39   && apt-get update \
    40   && apt-get install -y -q \
    41      apt-transport-https \
    42      build-essential \
    43      ca-certificates \
    44      curl \
    45      git \
    46      inetutils-ping \
    47      libffi-dev \
    48      libssl-dev \
    49      python3-aiodns=1.1.1-1 \
    50      python3-aiohttp>=2.3.2-1 \
    51      python3-aiopg \
    52      python3-async-timeout=1.2.0-1 \
    53      python3-bitcoin=1.1.42-1 \
    54      python3-cbor \
    55      python3-cchardet=2.0a3-1 \
    56      python3-colorlog \
    57      python3-cov-core \
    58      python3-cryptography-vectors=1.7.2-1 \
    59      python3-cryptography=1.7.2-1 \
    60      python3-dev \
    61      python3-grpcio-tools=1.1.3-1 \
    62      python3-grpcio=1.1.3-1 \
    63      python3-lmdb=0.92-1 \
    64      python3-multidict=2.1.4-1 \
    65      python3-netifaces=0.10.4-0.1build2 \
    66      python3-nose2 \
    67      python3-pip \
    68      python3-protobuf \
    69      python3-psycopg2 \
    70      python3-pycares=2.1.1-1 \
    71      python3-pyformance \
    72      python3-pytest-runner=2.6.2-1 \
    73      python3-pytest=2.9.0-1 \
    74      python3-pytz=2016.10-1 \
    75      python3-requests \
    76      python3-secp256k1=0.13.2-1 \
    77      python3-setuptools-scm=1.15.0-1 \
    78      python3-six=1.10.0-1 \
    79      python3-toml \
    80      python3-yaml \
    81      python3-yarl=0.10.0-1 \
    82      python3-zmq \
    83      software-properties-common \
    84   && apt-get clean \
    85   && rm -rf /var/lib/apt/lists/* \
    86   && pip3 install \
    87      pylint \
    88      pycodestyle \
    89      bandit \
    90      coverage --upgrade
    91  
    92  RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
    93   && add-apt-repository \
    94     "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    95        $(lsb_release -cs) \
    96           stable"
    97  
    98  RUN apt-get update && apt-get install -y -q \
    99      docker-ce \
   100   && apt-get clean \
   101   && rm -rf /var/lib/apt/lists/*
   102  
   103  EXPOSE 4004/tcp
   104  EXPOSE 8008
   105  
   106  RUN mkdir -p /project/sawtooth-core/ \
   107   && mkdir -p /var/log/sawtooth \
   108   && mkdir -p /var/lib/sawtooth \
   109   && mkdir -p /etc/sawtooth \
   110   && mkdir -p /etc/sawtooth/keys
   111  
   112  ENV PATH=$PATH:/project/sawtooth-core/bin
   113  
   114  WORKDIR /project/sawtooth-core
   115  CMD build_python