github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/ci/sawtooth-build-docs (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 the environment needed to build the Sawtooth docs 18 # Running the image will put the Sawtooth docs in 19 # sawtooth-core/docs/build on your local machine. 20 # 21 # Build: 22 # $ cd sawtooth-core 23 # $ docker build . -f ci/sawtooth-build-docs -t sawtooth-build-docs 24 # 25 # Run: 26 # $ cd sawtooth-core 27 # $ docker run -v $(pwd):/project/sawtooth-core sawtooth-build-docs 28 29 FROM ubuntu:xenial 30 31 RUN echo "deb [arch=amd64] http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 32 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 33 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 34 && apt-get update \ 35 && apt-get install -y -q --allow-downgrades \ 36 build-essential \ 37 git \ 38 libffi-dev \ 39 libssl-dev \ 40 libzmq3-dev \ 41 golang-golang-x-tools \ 42 pep8 \ 43 pkg-config \ 44 python3-aiodns=1.1.1-1 \ 45 python3-aiohttp=1.3.5-1 \ 46 python3-async-timeout=1.2.0-1 \ 47 python3-bitcoin=1.1.42-1 \ 48 python3-cbor \ 49 python3-cchardet=2.0a3-1 \ 50 python3-colorlog \ 51 python3-cryptography-vectors=1.7.2-1 \ 52 python3-cryptography=1.7.2-1 \ 53 python3-dev \ 54 python3-grpcio-tools=1.1.3-1 \ 55 python3-grpcio=1.1.3-1 \ 56 python3-lmdb=0.92-1 \ 57 python3-multidict=2.1.4-1 \ 58 python3-netifaces=0.10.4-0.1build2 \ 59 python3-pyformance \ 60 python3-pip \ 61 python3-protobuf \ 62 python3-pycares=2.1.1-1 \ 63 python3-pytest-runner=2.6.2-1 \ 64 python3-pytest=2.9.0-1 \ 65 python3-pytz=2016.10-1 \ 66 python3-requests \ 67 python3-secp256k1=0.13.2-1 \ 68 python3-setuptools-scm=1.15.0-1 \ 69 python3-six=1.10.0-1 \ 70 python3-toml \ 71 python3-yaml \ 72 python3-yarl=0.10.0-1 \ 73 python3-zmq \ 74 unzip \ 75 && apt-get clean \ 76 && rm -rf /var/lib/apt/lists/* \ 77 && pip3 install \ 78 pylint \ 79 bandit 80 81 # Install jsdoc 82 RUN apt-get update && apt-get install -y -q --no-install-recommends \ 83 curl \ 84 && curl -s -S -o /tmp/setup-node.sh https://deb.nodesource.com/setup_6.x \ 85 && chmod 755 /tmp/setup-node.sh \ 86 && /tmp/setup-node.sh \ 87 && apt-get install nodejs -y -q \ 88 && rm /tmp/setup-node.sh \ 89 && apt-get clean \ 90 && rm -rf /var/lib/apt/lists/* \ 91 && npm install -g \ 92 jsdoc 93 94 RUN apt-get update && apt-get install -y -q \ 95 dvipng \ 96 make \ 97 sudo \ 98 texlive-fonts-recommended \ 99 texlive-latex-base \ 100 texlive-latex-extra \ 101 texlive-latex-recommended \ 102 zip \ 103 && apt-get clean \ 104 && rm -rf /var/lib/apt/lists/* \ 105 && pip3 install \ 106 sphinx==1.5.6 \ 107 sphinxcontrib-httpdomain \ 108 sphinxcontrib-openapi \ 109 sphinx_rtd_theme 110 111 RUN curl -OLsS https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip \ 112 && unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 \ 113 && rm protoc-3.5.1-linux-x86_64.zip 114 115 RUN curl https://sh.rustup.rs -sSf > /usr/bin/rustup-init \ 116 && chmod +x /usr/bin/rustup-init \ 117 && rustup-init -y 118 119 ENV GOPATH=/go:/project/sawtooth-core/sdk/go \ 120 PYTHONPATH=/project/sawtooth-core/sdk/python:/project/sawtooth-core/signing \ 121 PATH=$PATH:/protoc3/bin:/project/sawtooth-core/bin:/root/.cargo/bin \ 122 CARGO_INCREMENTAL=0 123 124 WORKDIR /project/sawtooth-core/docs 125 CMD make html latexpdf