github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/docker/lint (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 ubuntu:xenial
    16  
    17  RUN echo "deb [arch=amd64] http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \
    18   && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \
    19   || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \
    20   && apt-get update
    21  
    22  RUN apt-get install -y -q \
    23      git \
    24      python3 \
    25      python3-aiohttp>=2.3.2-1 \
    26      python3-cbor \
    27      python3-colorlog \
    28      python3-cryptography-vectors=1.7.2-1 \
    29      python3-cryptography=1.7.2-1 \
    30      python3-lmdb \
    31      python3-netifaces=0.10.4-0.1build2 \
    32      python3-pip \
    33      python3-protobuf \
    34      python3-pyformance \
    35      python3-requests \
    36      python3-secp256k1=0.13.2-1 \
    37      python3-toml \
    38      python3-yaml \
    39      python3-zmq \
    40      && pip3 install \
    41      pylint \
    42      pycodestyle \
    43      bandit \
    44      coverage --upgrade
    45  
    46  RUN apt-get install -y -q --allow-downgrades \
    47      build-essential \
    48      golang-1.9-go \
    49      git \
    50      libssl-dev \
    51      libzmq3-dev \
    52      openssl \
    53      python3-grpcio-tools=1.1.3-1
    54  
    55  ENV GOPATH=/go:/project/sawtooth-core/sdk/go:/project/sawtooth-core/sdk/examples/intkey_go:/project/sawtooth-core/sdk/examples/noop_go:/project/sawtooth-core/sdk/examples/xo_go
    56  
    57  ENV PATH=$PATH:/project/sawtooth-core/bin:/go/bin:/usr/lib/go-1.9/bin
    58  
    59  RUN mkdir /go
    60  
    61  RUN go get -u \
    62      github.com/golang/protobuf/proto \
    63      github.com/golang/protobuf/protoc-gen-go \
    64      github.com/pebbe/zmq4 \
    65      github.com/brianolson/cbor_go \
    66      github.com/satori/go.uuid \
    67      github.com/btcsuite/btcd/btcec \
    68      github.com/jessevdk/go-flags \
    69      github.com/pelletier/go-toml \
    70      github.com/golang/mock/gomock \
    71      github.com/golang/mock/mockgen \
    72      golang.org/x/crypto/ripemd160 \
    73      golang.org/x/crypto/ssh/terminal \
    74      gopkg.in/fatih/set.v0
    75  
    76  
    77  RUN apt-get install -y -q --allow-downgrades \
    78      build-essential \
    79      curl \
    80      libssl-dev \
    81      gcc \
    82      libzmq3-dev \
    83      openssl \
    84      pkg-config \
    85      python3-grpcio-tools=1.1.3-1 \
    86      unzip
    87  
    88  RUN curl -OLsS https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip \
    89   && unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 \
    90   && rm protoc-3.5.1-linux-x86_64.zip
    91  
    92  RUN curl https://sh.rustup.rs -sSf > /usr/bin/rustup-init \
    93   && chmod +x /usr/bin/rustup-init \
    94   && rustup-init -y
    95  
    96  ENV PATH=$PATH:/protoc3/bin:/project/sawtooth-core/bin:/root/.cargo/bin \
    97      CARGO_INCREMENTAL=0
    98  
    99  RUN rustup component add rustfmt-preview
   100  
   101  WORKDIR /project/sawtooth-core