|
| 1 | +# This container is to run indy-node. |
| 2 | +# This file is part of https://github.com/hyperledger/indy-node-container . |
| 3 | +# Copyright 2021-2025 by all people listed in https://github.com/hyperledger/indy-node-container/blob/main/NOTICE , see |
| 4 | +# https://github.com/hyperledger/indy-node-container/blob/main/LICENSE for the license information. |
| 5 | + |
| 6 | + |
| 7 | +FROM python:3.8-slim-bookworm |
| 8 | + |
| 9 | + |
| 10 | +ENV DEBIAN_FRONTEND=noninteractive |
| 11 | + |
| 12 | +# Install environment |
| 13 | +RUN apt-get update -y && apt-get upgrade -y && apt-get install -y \ |
| 14 | + apt-transport-https \ |
| 15 | + ca-certificates \ |
| 16 | + software-properties-common \ |
| 17 | + iproute2 \ |
| 18 | + gnupg2 \ |
| 19 | + && apt-get autoremove -y |
| 20 | + |
| 21 | + |
| 22 | +RUN \ |
| 23 | + # Ubtuntu 16 + sovrin repos are needed for old plenum dependencies going back to libssl1.0.0 |
| 24 | + add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial universe" \ |
| 25 | + && add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial main" \ |
| 26 | + && add-apt-repository "deb http://archive.ubuntu.com/ubuntu xenial-security main" \ |
| 27 | + && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CE7709D068DB5E88 40976EAF437D05B5 3B4FE6ACC0B21F32 \ |
| 28 | + && add-apt-repository "deb https://repo.sovrin.org/deb xenial stable" \ |
| 29 | + # Hyperledger Artifactory for latest indy-node |
| 30 | + && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 9692C00E657DDE61 \ |
| 31 | + && add-apt-repository "deb https://hyperledger.jfrog.io/artifactory/indy focal stable" \ |
| 32 | + # Prioritize packages from hyperledger.jfrog.io |
| 33 | +# && printf '%s\n%s\n%s\n' 'Package: *' 'Pin: origin hyperledger.jfrog.io' 'Pin-Priority: 1001' >> /etc/apt/preferences \ |
| 34 | + && apt-get update -y |
| 35 | + |
| 36 | + |
| 37 | +RUN apt-get install -y --allow-downgrades \ |
| 38 | + indy-node=1.13.2 \ |
| 39 | + indy-plenum=1.13.1 \ |
| 40 | + ursa=0.3.2-1 \ |
| 41 | + python3-libnacl=1.6.1 \ |
| 42 | + python3-pympler=0.8 \ |
| 43 | + python3-sortedcontainers=1.5.7 \ |
| 44 | + python3-ujson=1.33 \ |
| 45 | + python3-importlib-metadata=3.10.1 \ |
| 46 | + python3-distro=1.7.0 \ |
| 47 | + && apt-get autoremove -y \ |
| 48 | + && apt-get clean |
| 49 | + |
| 50 | + |
| 51 | +ENV PYTHONPATH="/usr/local/lib/python3.8:/usr/local/lib/python3.8/dist-packages/:/usr/local/lib/python3.8/site-packages/:/usr/local/lib/python3.11/dist-packages/" |
| 52 | + |
| 53 | + |
| 54 | +# use python 3.8 |
| 55 | +RUN rm /usr/bin/python3 && ln -s /usr/local/bin/python3 /usr/bin/python3 |
| 56 | + |
| 57 | +# find lib ursa |
| 58 | +RUN ln -s /usr/lib/ursa/libursa.so /usr/lib/libursa.so |
| 59 | + |
| 60 | +# `sha3` is broken -> use `pysha3` instead |
| 61 | +RUN rm -rf /usr/local/lib/python3.8/dist-packages/*sha3* |
| 62 | + |
| 63 | +# needed for pip install pysha3 |
| 64 | +RUN apt-get install -y gcc |
| 65 | + |
| 66 | +# missing python packages |
| 67 | +RUN pip install tz python-dateutil pysha3 zipp six rocksdb orderedset packaging prompt_toolkit |
| 68 | + |
| 69 | + |
| 70 | +WORKDIR /home/indy |
| 71 | + |
| 72 | +COPY init_and_run.sh ./ |
| 73 | + |
| 74 | + |
| 75 | +CMD ["./init_and_run.sh"] |
| 76 | + |
| 77 | +VOLUME ["/var/log/indy"] |
| 78 | + |
| 79 | +RUN rm -rf /var/lib/apt/lists/* |
0 commit comments