github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-supply-chain-master/shell/Dockerfile (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 FROM hyperledger/sawtooth-shell:1.0 17 18 # Install Python, Node.js, and Ubuntu dependencies 19 RUN echo "deb http://repo.sawtooth.me/ubuntu/1.0/stable xenial universe" >> /etc/apt/sources.list \ 20 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 21 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 22 && apt-get update \ 23 && apt-get install -y -q \ 24 apt-transport-https \ 25 build-essential \ 26 ca-certificates \ 27 curl \ 28 libzmq3-dev \ 29 pkg-config \ 30 python3 \ 31 python3-colorlog \ 32 python3-dev \ 33 python3-grpcio-tools=1.1.3-1 \ 34 python3-grpcio=1.1.3-1 \ 35 python3-nose2 \ 36 python3-pip \ 37 python3-protobuf \ 38 python3-pytest-runner=2.6.2-1 \ 39 python3-pytest=2.9.0-1 \ 40 python3-sawtooth-sdk \ 41 python3-sawtooth-signing \ 42 python3-setuptools-scm=1.15.0-1 \ 43 python3-yaml \ 44 software-properties-common \ 45 && curl -s -S -o /tmp/setup-node.sh https://deb.nodesource.com/setup_8.x \ 46 && chmod 755 /tmp/setup-node.sh \ 47 && /tmp/setup-node.sh \ 48 && apt-get install nodejs -y -q \ 49 && rm /tmp/setup-node.sh \ 50 && apt-get clean \ 51 && rm -rf /var/lib/apt/lists/* \ 52 && npm install -g prebuild-install 53 54 WORKDIR /sawtooth-supply-chain 55 56 # Install NPM dependencies to central location, link to individual components 57 COPY bin/splice_json bin/ 58 COPY asset_client/package.json asset_client/ 59 COPY fish_client/package.json fish_client/ 60 COPY server/package.json server/ 61 62 RUN \ 63 if [ ! -z $HTTP_PROXY ] && [ -z $http_proxy ]; then \ 64 http_proxy=$HTTP_PROXY; \ 65 fi; \ 66 if [ ! -z $HTTPS_PROXY ] && [ -z $https_proxy ]; then \ 67 https_proxy=$HTTPS_PROXY; \ 68 fi; \ 69 if [ ! -z $http_proxy ]; then \ 70 npm config set proxy $http_proxy; \ 71 fi; \ 72 if [ ! -z $https_proxy ]; then \ 73 npm config set https-proxy $https_proxy; \ 74 fi 75 76 RUN mkdir /node_deps \ 77 && bin/splice_json \ 78 asset_client/package.json \ 79 fish_client/package.json \ 80 server/package.json \ 81 > /node_deps/package.json \ 82 && cd /node_deps && npm install && cd - \ 83 && ln -s /node_deps/node_modules asset_client/ \ 84 && ln -s /node_deps/node_modules fish_client/ \ 85 && ln -s /node_deps/node_modules server/ 86 87 ENV PATH $PATH:/sawtooth-supply-chain/bin 88 89 CMD ["tail", "-f", "/dev/null"]