Browse Source

Merge pull request #9 from l-n-s/fix_docker

create default netDb dir
pull/13/head
l-n-s 7 years ago committed by GitHub
parent
commit
cfd7ae4b9a
  1. 2
      contrib/docker/Dockerfile
  2. 7
      contrib/docker/entrypoint.sh

2
contrib/docker/Dockerfile

@ -16,6 +16,8 @@ RUN apk --no-cache add python3 py3-pip build-base git openssl-dev musl-dev pytho @@ -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

7
contrib/docker/entrypoint.sh

@ -12,11 +12,14 @@ else @@ -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

Loading…
Cancel
Save