github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/ci/sawtooth-shell-installed (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 # docker build -f ci/sawtooth-shell-installed -t sawtooth-shell . 16 17 # -------------=== signing build ===------------- 18 19 FROM ubuntu:xenial as sawtooth-signing-builder 20 21 ENV VERSION=AUTO_STRICT 22 23 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 24 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 25 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 26 && apt-get update \ 27 && apt-get install -y -q --allow-downgrades \ 28 git \ 29 python3 \ 30 python3-protobuf \ 31 python3-secp256k1 \ 32 python3-stdeb \ 33 python3-grpcio-tools \ 34 python3-grpcio 35 36 COPY . /project 37 38 RUN /project/bin/protogen \ 39 && cd /project/signing \ 40 && if [ -d "debian" ]; then rm -rf debian; fi \ 41 && python3 setup.py clean --all \ 42 && python3 setup.py --command-packages=stdeb.command debianize \ 43 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 44 && dpkg-buildpackage -b -rfakeroot -us -uc 45 46 47 # -------------=== python sdk build ===------------- 48 49 FROM ubuntu:xenial as sawtooth-sdk-python-builder 50 51 ENV VERSION=AUTO_STRICT 52 53 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 54 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 55 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 56 && apt-get update \ 57 && apt-get install -y -q --allow-downgrades \ 58 git \ 59 python3 \ 60 python3-colorlog \ 61 python3-protobuf \ 62 python3-stdeb \ 63 python3-grpcio-tools \ 64 python3-grpcio \ 65 python3-toml \ 66 python3-yaml 67 68 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 69 70 COPY . /project 71 72 RUN dpkg -i /tmp/python3-sawtooth-*.deb || true \ 73 && apt-get -f -y install \ 74 && /project/bin/protogen \ 75 && cd /project/sdk/python \ 76 && if [ -d "debian" ]; then rm -rf debian; fi \ 77 && python3 setup.py clean --all \ 78 && python3 setup.py --command-packages=stdeb.command debianize \ 79 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 80 && dpkg-buildpackage -b -rfakeroot -us -uc 81 82 83 # -------------=== python xo tp build ===------------- 84 85 FROM ubuntu:xenial as python-xo-tp-builder 86 87 ENV VERSION=AUTO_STRICT 88 89 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 90 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 91 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 92 && apt-get update \ 93 && apt-get install -y -q --allow-downgrades \ 94 git \ 95 python3 \ 96 python3-cbor \ 97 python3-colorlog \ 98 python3-grpcio-tools \ 99 python3-grpcio \ 100 python3-protobuf \ 101 python3-stdeb 102 103 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 104 COPY --from=sawtooth-sdk-python-builder /project/sdk/python3-sawtooth-sdk*.deb /tmp 105 106 COPY . /project 107 108 RUN dpkg -i /tmp/python3-sawtooth-*.deb || true \ 109 && apt-get -f -y install \ 110 && /project/bin/protogen \ 111 && cd /project/sdk/examples/xo_python/ \ 112 && if [ -d "debian" ]; then rm -rf debian; fi \ 113 && python3 setup.py clean --all \ 114 && python3 setup.py --command-packages=stdeb.command debianize \ 115 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 116 && dpkg-buildpackage -b -rfakeroot -us -uc 117 118 119 # -------------=== settings build ===------------- 120 121 FROM ubuntu:xenial as sawtooth-settings-builder 122 123 ENV VERSION=AUTO_STRICT 124 125 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 126 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 127 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 128 && apt-get update \ 129 && apt-get install -y -q --allow-downgrades \ 130 git \ 131 python3 \ 132 python3-colorlog \ 133 python3-protobuf \ 134 python3-stdeb \ 135 python3-grpcio-tools \ 136 python3-grpcio 137 138 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 139 COPY --from=sawtooth-sdk-python-builder /project/sdk/python3-sawtooth-sdk*.deb /tmp 140 141 COPY . /project 142 143 RUN dpkg -i /tmp/python3-sawtooth-*.deb || true \ 144 && apt-get -f -y install \ 145 && /project/bin/protogen \ 146 && cd /project/families/settings \ 147 && if [ -d "debian" ]; then rm -rf debian; fi \ 148 && python3 setup.py clean --all \ 149 && python3 setup.py --command-packages=stdeb.command debianize \ 150 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 151 && dpkg-buildpackage -b -rfakeroot -us -uc 152 153 154 # -------------=== python intkey tp build ===------------- 155 156 FROM ubuntu:xenial as python-intkey-tp-builder 157 158 ENV VERSION=AUTO_STRICT 159 160 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 161 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 162 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 163 && apt-get update \ 164 && apt-get install -y -q --allow-downgrades \ 165 git \ 166 python3 \ 167 python3-cbor \ 168 python3-colorlog \ 169 python3-grpcio-tools \ 170 python3-grpcio \ 171 python3-protobuf \ 172 python3-stdeb 173 174 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 175 COPY --from=sawtooth-sdk-python-builder /project/sdk/python3-sawtooth-sdk*.deb /tmp 176 177 COPY . /project 178 179 RUN dpkg -i /tmp/python3-sawtooth-*.deb || true \ 180 && apt-get -f -y install \ 181 && /project/bin/protogen \ 182 && cd /project/sdk/examples/intkey_python/ \ 183 && if [ -d "debian" ]; then rm -rf debian; fi \ 184 && python3 setup.py clean --all \ 185 && python3 setup.py --command-packages=stdeb.command debianize \ 186 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 187 && dpkg-buildpackage -b -rfakeroot -us -uc 188 189 190 # -------------=== validator build ===------------- 191 FROM ubuntu:xenial as sawtooth-validator-builder 192 193 ENV VERSION=AUTO_STRICT 194 195 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 196 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 197 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 198 && apt-get update \ 199 && apt-get install -y -q --allow-downgrades \ 200 git \ 201 python3 \ 202 python3-dev \ 203 python3-grpcio \ 204 python3-grpcio-tools \ 205 python3-protobuf \ 206 python3-pyformance \ 207 python3-secp256k1 \ 208 python3-stdeb \ 209 python3-toml \ 210 unzip 211 212 RUN curl -OLsS https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip \ 213 && unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 \ 214 && rm protoc-3.5.1-linux-x86_64.zip 215 216 RUN curl https://sh.rustup.rs -sSf > /usr/bin/rustup-init \ 217 && chmod +x /usr/bin/rustup-init \ 218 && rustup-init -y 219 220 ENV PATH=$PATH:/project/sawtooth-core/bin:/protoc3/bin:/project/sawtooth-core/bin:/root/.cargo/bin \ 221 CARGO_INCREMENTAL=0 222 223 RUN ln -s /usr/bin/python3 /usr/bin/python 224 225 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 226 227 COPY . /project 228 229 RUN dpkg -i /tmp/python3-sawtooth-signing*.deb || true \ 230 && apt-get -f -y install \ 231 && /project/bin/protogen \ 232 && cd /project/validator \ 233 && if [ -d "debian" ]; then rm -rf debian; fi \ 234 && python3 setup.py clean --all \ 235 && python3 setup.py --command-packages=stdeb.command debianize \ 236 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 237 && if [ -d "bin" ]; then rm -rf bin; fi \ 238 && mkdir bin \ 239 && if [ -d "lib" ]; then rm -rf lib; fi \ 240 && mkdir lib \ 241 && cargo build --release \ 242 && cp ./target/release/sawtooth-validator bin/sawtooth-validator \ 243 && cp ./target/release/libsawtooth_validator.so lib/libsawtooth_validator.so \ 244 && dpkg-buildpackage -b -rfakeroot -us -uc 245 246 247 # -------------=== poet common build ===------------- 248 249 FROM ubuntu:xenial as poet-common-builder 250 251 ENV VERSION=AUTO_STRICT 252 253 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 254 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 255 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 256 && apt-get update \ 257 && apt-get install -y -q --allow-downgrades \ 258 git \ 259 python3 \ 260 python3-grpcio-tools \ 261 python3-grpcio \ 262 python3-protobuf \ 263 python3-stdeb 264 265 COPY . /project 266 267 RUN /project/bin/protogen \ 268 && cd /project/consensus/poet/common/ \ 269 && if [ -d "debian" ]; then rm -rf debian; fi \ 270 && python3 setup.py clean --all \ 271 && python3 setup.py --command-packages=stdeb.command debianize \ 272 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 273 && dpkg-buildpackage -b -rfakeroot -us -uc 274 275 276 # -------------=== simulator build ===------------- 277 FROM ubuntu:xenial as sawtooth-simulator-builder 278 279 ENV VERSION=AUTO_STRICT 280 281 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 282 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 283 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 284 && apt-get update \ 285 && apt-get install -y -q --allow-downgrades \ 286 python3-cryptography>-1.7.1 \ 287 git \ 288 python3 \ 289 python3-protobuf \ 290 python3-secp256k1 \ 291 python3-stdeb \ 292 python3-grpcio-tools \ 293 python3-grpcio 294 295 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 296 COPY --from=poet-common-builder /project/consensus/poet/python3-sawtooth-poet-common*.deb /tmp 297 COPY --from=sawtooth-validator-builder /project/python3-sawtooth-validator*.deb /tmp 298 299 COPY . /project 300 301 RUN dpkg -i /tmp/python3-sawtooth*.deb || true \ 302 && apt-get -f -y install \ 303 && /project/bin/protogen \ 304 && cd /project/consensus/poet/simulator/ \ 305 && if [ -d "debian" ]; then rm -rf debian; fi \ 306 && python3 setup.py clean --all \ 307 && python3 setup.py --command-packages=stdeb.command debianize \ 308 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 309 && dpkg-buildpackage -b -rfakeroot -us -uc 310 311 312 # -------------=== poet core build ===------------- 313 314 FROM ubuntu:xenial as poet-core-builder 315 316 ENV VERSION=AUTO_STRICT 317 318 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 319 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 320 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 321 && apt-get update \ 322 && apt-get install -y -q --allow-downgrades \ 323 git \ 324 python3 \ 325 python3-grpcio-tools \ 326 python3-grpcio \ 327 python3-protobuf \ 328 python3-requests \ 329 python3-stdeb 330 331 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 332 COPY --from=poet-common-builder /project/consensus/poet/python3-sawtooth-poet-common*.deb /tmp 333 COPY --from=sawtooth-validator-builder /project/python3-sawtooth-validator*.deb /tmp 334 COPY --from=sawtooth-simulator-builder /project/consensus/poet/python3-sawtooth-poet-simulator*.deb /tmp 335 336 COPY . /project 337 338 RUN dpkg -i /tmp/python3-sawtooth*.deb || true \ 339 && apt-get -f -y install \ 340 && /project/bin/protogen \ 341 && cd /project/consensus/poet/core/ \ 342 && if [ -d "debian" ]; then rm -rf debian; fi \ 343 && python3 setup.py clean --all \ 344 && python3 setup.py --command-packages=stdeb.command debianize \ 345 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 346 && dpkg-buildpackage -b -rfakeroot -us -uc 347 348 349 # -------------=== poet cli build ===------------- 350 351 FROM ubuntu:xenial as poet-cli-builder 352 353 ENV VERSION=AUTO_STRICT 354 355 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 356 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 357 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 358 && apt-get update \ 359 && apt-get install -y -q --allow-downgrades \ 360 git \ 361 python3 \ 362 python3-colorlog \ 363 python3-grpcio-tools \ 364 python3-grpcio \ 365 python3-protobuf \ 366 python3-stdeb \ 367 python3-toml 368 369 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 370 COPY --from=poet-common-builder /project/consensus/poet/python3-sawtooth-poet-common*.deb /tmp 371 COPY --from=sawtooth-validator-builder /project/python3-sawtooth-validator*.deb /tmp 372 COPY --from=sawtooth-simulator-builder /project/consensus/poet/python3-sawtooth-poet-simulator*.deb /tmp 373 COPY --from=poet-core-builder /project/consensus/poet/python3-sawtooth-poet-core*.deb /tmp 374 375 COPY . /project 376 377 RUN dpkg -i /tmp/python3-sawtooth*.deb || true \ 378 && apt-get -f -y install \ 379 && /project/bin/protogen \ 380 && cd /project/consensus/poet/cli/ \ 381 && if [ -d "debian" ]; then rm -rf debian; fi \ 382 && python3 setup.py clean --all \ 383 && python3 setup.py --command-packages=stdeb.command debianize \ 384 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 385 && dpkg-buildpackage -b -rfakeroot -us -uc 386 387 388 # -------------=== cli build ===------------- 389 FROM ubuntu:xenial as cli-builder 390 391 ENV VERSION=AUTO_STRICT 392 393 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 394 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 395 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 396 && apt-get update \ 397 && apt-get install -y -q --allow-downgrades \ 398 git \ 399 python3 \ 400 python3-protobuf \ 401 python3-stdeb \ 402 python3-toml \ 403 python3-grpcio-tools \ 404 python3-grpcio 405 406 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 407 408 COPY . /project 409 410 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 411 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 412 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 413 && apt-get update \ 414 && dpkg -i /tmp/python3-sawtooth-*.deb || true \ 415 && apt-get -f -y install 416 417 RUN /project/bin/protogen \ 418 && cd /project/cli \ 419 && if [ -d "debian" ]; then rm -rf debian; fi \ 420 && python3 setup.py clean --all \ 421 && python3 setup.py --command-packages=stdeb.command debianize \ 422 && if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \ 423 && dpkg-buildpackage -b -rfakeroot -us -uc 424 425 426 # -------------=== sawtooth shell docker build ===------------- 427 FROM ubuntu:xenial 428 429 COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp 430 COPY --from=sawtooth-sdk-python-builder /project/sdk/python3-sawtooth-sdk*.deb /tmp 431 COPY --from=poet-common-builder /project/consensus/poet/python3-sawtooth-poet-common*.deb /tmp 432 COPY --from=sawtooth-validator-builder /project/python3-sawtooth-validator*.deb /tmp 433 COPY --from=sawtooth-simulator-builder /project/consensus/poet/python3-sawtooth-poet-simulator*.deb /tmp 434 COPY --from=poet-core-builder /project/consensus/poet/python3-sawtooth-poet-core*.deb /tmp 435 COPY --from=poet-cli-builder /project/consensus/poet/python3-sawtooth-poet-cli*.deb /tmp 436 COPY --from=cli-builder /project/python3-sawtooth-cli* /tmp 437 COPY --from=python-intkey-tp-builder /project/sdk/examples/python3-sawtooth-intkey*.deb /tmp 438 COPY --from=python-xo-tp-builder /project/sdk/examples/python3-sawtooth-xo*.deb /tmp 439 440 RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \ 441 && (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \ 442 || apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \ 443 && apt-get update \ 444 && apt-get install -q -y curl \ 445 && dpkg -i /tmp/python3-sawtooth-*.deb || true \ 446 && apt-get -f -y install