forked from bcgov/von-network
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to von-indy image and allow registration by did/verkey pair in…
…stead of seed
- Loading branch information
1 parent
81bcfa6
commit f7b59ed
Showing
8 changed files
with
137 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,30 @@ | ||
FROM ubuntu:16.04 | ||
FROM von-indy:latest | ||
|
||
ARG uid=1000 | ||
ARG indy_stream=master | ||
|
||
ARG indy_plenum_ver=1.2.237 | ||
ARG indy_anoncreds_ver=1.0.32 | ||
ARG indy_node_ver=1.2.297 | ||
ARG python3_indy_crypto_ver=0.2.0 | ||
ARG indy_crypto_ver=0.2.0 | ||
|
||
ENV LC_ALL="C.UTF-8" | ||
ENV LANG="C.UTF-8" | ||
ENV SHELL="/bin/bash" | ||
|
||
ENV RUST_LOG=error | ||
|
||
# Install environment | ||
RUN apt-get update -y && apt-get install -y \ | ||
git \ | ||
wget \ | ||
python3.5 \ | ||
python3-pip \ | ||
python-setuptools \ | ||
python3-nacl \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
build-essential \ | ||
pkg-config \ | ||
cmake \ | ||
libssl-dev \ | ||
libsqlite3-dev \ | ||
libsodium-dev \ | ||
curl | ||
|
||
RUN pip3 install -U \ | ||
pip \ | ||
setuptools | ||
|
||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 | ||
RUN echo "deb https://repo.sovrin.org/deb xenial $indy_stream" >> /etc/apt/sources.list | ||
|
||
RUN useradd -ms /bin/bash -u $uid indy | ||
|
||
RUN apt-get update -y && apt-get install -y \ | ||
indy-plenum=${indy_plenum_ver} \ | ||
indy-anoncreds=${indy_anoncreds_ver} \ | ||
indy-node=${indy_node_ver} \ | ||
python3-indy-crypto=${python3_indy_crypto_ver} \ | ||
libindy-crypto=${indy_crypto_ver} \ | ||
libzmq3-dev \ | ||
vim | ||
|
||
USER indy | ||
WORKDIR /home/indy | ||
|
||
# Install rust toolchain | ||
RUN curl -o rustup https://sh.rustup.rs | ||
RUN chmod +x rustup | ||
RUN ./rustup -y | ||
|
||
# Build libindy | ||
RUN git clone https://github.com/bcgov/indy-sdk.git | ||
WORKDIR /home/indy/indy-sdk/libindy | ||
RUN git fetch | ||
RUN /home/indy/.cargo/bin/cargo build | ||
|
||
# Move libindy to lib path | ||
USER root | ||
RUN mv target/debug/libindy.so /usr/lib | ||
|
||
RUN pip3 install --upgrade setuptools | ||
RUN pip3 install pipenv | ||
ADD --chown=indy:indy indy_config.py /etc/indy/ | ||
|
||
USER indy | ||
WORKDIR /home/indy | ||
|
||
ADD bin/* /usr/local/bin/ | ||
RUN apt-get update -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
python3.5-dev && \ | ||
pip --no-cache-dir install \ | ||
sanic==0.7.0 \ | ||
ujson==1.33 && \ | ||
apt-get remove --purge -y \ | ||
build-essential \ | ||
python3.5-dev && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN awk '{if (index($1, "NETWORK_NAME") != 0) {print("NETWORK_NAME = \"sandbox\"")} else print($0)}' /etc/indy/indy_config.py> /tmp/indy_config.py | ||
RUN mv /tmp/indy_config.py /etc/indy/indy_config.py | ||
ADD . $HOME | ||
|
||
ADD --chown=indy:indy . /home/indy | ||
RUN mkdir -p $HOME/ledger/sandbox/data && \ | ||
mkdir -p $HOME/.indy_client/wallet && \ | ||
chown -R indy:indy $HOME && \ | ||
chmod -R ug+rw $HOME | ||
|
||
RUN mkdir -p /home/indy/.indy_client/wallet | ||
# used by validator-info | ||
#RUN apt-get install -y --no-install-recommends iproute2 sovrin | ||
|
||
RUN chgrp -R indy /home/indy/.indy_client/wallet \ | ||
&& chmod -R g+rwx /home/indy/.indy_client/wallet | ||
|
||
RUN cd server && \ | ||
pipenv install -r requirements.txt | ||
USER indy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
NETWORK_NAME = 'sandbox' | ||
|
||
LEDGER_DIR = '/home/indy/ledger' | ||
LOG_DIR = '/home/indy/log' | ||
KEYS_DIR = LEDGER_DIR | ||
GENESIS_DIR = LEDGER_DIR | ||
BACKUP_DIR = '/home/indy/backup' | ||
PLUGINS_DIR = '/home/indy/plugins' | ||
NODE_INFO_DIR = LEDGER_DIR | ||
|
||
CLI_BASE_DIR = '/home/indy/.indy-cli/' | ||
CLI_NETWORK_DIR = '/home/indy/.indy-cli/networks' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.