From fba6eb4f3a80bbbc53367ecaab65222557308c8a Mon Sep 17 00:00:00 2001 From: l-n-s Date: Sun, 30 Jul 2017 05:10:49 -0400 Subject: [PATCH] create default netDb dir --- contrib/docker/Dockerfile | 2 ++ contrib/docker/entrypoint.sh | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile index 7114aae..de238cc 100644 --- a/contrib/docker/Dockerfile +++ b/contrib/docker/Dockerfile @@ -16,6 +16,8 @@ RUN apk --no-cache add python3 py3-pip build-base git openssl-dev musl-dev pytho # 2. Adding required libraries to run i2pd to ensure it will run. RUN apk --no-cache add python3 openssl +RUN mkdir /netDb + VOLUME "$DATA_DIR" COPY entrypoint.sh /entrypoint.sh diff --git a/contrib/docker/entrypoint.sh b/contrib/docker/entrypoint.sh index b2ff01b..beb2945 100755 --- a/contrib/docker/entrypoint.sh +++ b/contrib/docker/entrypoint.sh @@ -12,11 +12,14 @@ else PRIVKEY_FILE="$DATA_DIR/data/private_key.pem" CERT_FILE=` echo $DATA_DIR/data/$SIGNER_ID.crt | sed 's/@/_at_/' ` RESEED_FILE="$DATA_DIR/output/i2pseeds.su3" - I2PD_DIR="/i2pd_data" + NETDB_DIR="/i2pd_data/netDb" + if [ ! -d $NETDB_DIR ]; then + NETDB_DIR="/netDb" + fi $COMMAND keygen --signer-id $SIGNER_ID --no-encrypt \ --private-key $PRIVKEY_FILE --cert $CERT_FILE - $COMMAND reseed --netdb $I2PD_DIR/netDb --signer-id $SIGNER_ID --no-encrypt \ + $COMMAND reseed --netdb $NETDB_DIR --signer-id $SIGNER_ID --no-encrypt \ --private-key $PRIVKEY_FILE --outfile $RESEED_FILE $COMMAND serve --private-key $PRIVKEY_FILE --cert $CERT_FILE --file $RESEED_FILE fi