mirror of
https://github.com/oldnick85/i2pd_yggdrasil_docker.git
synced 2025-11-29 03:23:13 +01:00
[ref] include util scripts to image
This commit is contained in:
+15
@@ -62,6 +62,20 @@ RUN DEBIAN_FRONTEND=noninteractive\
|
||||
apt-get install -y \
|
||||
libminiupnpc17 \
|
||||
git python3 python3-pip iputils-ping
|
||||
# ==== UTILS ====
|
||||
WORKDIR /UTILS/
|
||||
RUN git config --global advice.detachedHead false
|
||||
# script to get strong yggdrasil address (https://yggdrasil-network.github.io/configuration.html#generating-stronger-addresses-and-prefixes)
|
||||
RUN git clone --depth 1 --branch v0 https://github.com/oldnick85/yggdrasil_get_keys.git /UTILS/yggdrasil_get_keys
|
||||
RUN python3 -m pip install -r /UTILS/yggdrasil_get_keys/requirements.txt
|
||||
# script to find yggdrasil public peers
|
||||
RUN git clone --depth 1 --branch v3 https://github.com/oldnick85/yggdrasil_find_public_peers.git /UTILS/yggdrasil_find_public_peers
|
||||
RUN python3 -m pip install -r /UTILS/yggdrasil_find_public_peers/requirements.txt
|
||||
# save peers to use in case of unavailable repository
|
||||
RUN python3 /UTILS/yggdrasil_find_public_peers/yggdrasil_find_public_peers.py \
|
||||
--yggdrasil-conf="" \
|
||||
--yggdrasil-peers-json="/UTILS/yggdrasil_find_public_peers/public_peers.json"
|
||||
# ==== I2P ====
|
||||
# Ports Used by I2P
|
||||
# Webconsole
|
||||
EXPOSE 7070
|
||||
@@ -84,6 +98,7 @@ COPY --from=builder_i2pd /BUILD_I2PD/i2pd/build/i2pd .
|
||||
COPY --from=builder_i2pd /BUILD_I2PD/i2pd/contrib/certificates ./certificates
|
||||
COPY i2pd.conf .
|
||||
RUN ulimit -n 4096
|
||||
# ==== YGGDRASIL ====
|
||||
# Ports used by YGGDRASIL
|
||||
# Listen
|
||||
EXPOSE 10654
|
||||
|
||||
+7
-9
@@ -1,25 +1,23 @@
|
||||
#!/bin/bash
|
||||
git config --global advice.detachedHead false
|
||||
git clone --depth 1 --branch v0 https://github.com/oldnick85/yggdrasil_get_keys.git /tmp/yggdrasil_get_keys
|
||||
python3 -m pip install -r /tmp/yggdrasil_get_keys/requirements.txt
|
||||
python3 /tmp/yggdrasil_get_keys/yggdrasil_get_keys.py \
|
||||
# get strong yggdrasil address (https://yggdrasil-network.github.io/configuration.html#generating-stronger-addresses-and-prefixes)
|
||||
python3 /UTILS/yggdrasil_get_keys/yggdrasil_get_keys.py \
|
||||
--genkeys="/YGGDRASIL/genkeys" \
|
||||
--yggdrasil-conf="/YGGDRASIL/yggdrasil.conf" \
|
||||
--timeout=60 \
|
||||
--environment
|
||||
rm -rf /tmp/yggdrasil_get_keys
|
||||
git clone --depth 1 --branch v1 https://github.com/oldnick85/yggdrasil_find_public_peers.git /tmp/yggdrasil_find_public_peers
|
||||
python3 -m pip install -r /tmp/yggdrasil_find_public_peers/requirements.txt
|
||||
python3 /tmp/yggdrasil_find_public_peers/yggdrasil_find_public_peers.py \
|
||||
# find yggdrasil public peers
|
||||
python3 /UTILS/yggdrasil_find_public_peers/yggdrasil_find_public_peers.py \
|
||||
--yggdrasil-conf="/YGGDRASIL/yggdrasil.conf" \
|
||||
--yggdrasil-peers-json="/UTILS/yggdrasil_find_public_peers/public_peers.json" \
|
||||
--parallel=4 \
|
||||
--pings=10 \
|
||||
--best=5 \
|
||||
--ping-interval=0.5
|
||||
rm -rf yggdrasil_find_public_peers
|
||||
sysctl net.ipv6.conf.all.disable_ipv6=0 || true
|
||||
# start YGGDRASIL
|
||||
/YGGDRASIL/yggdrasil -useconffile /YGGDRASIL/yggdrasil.conf &
|
||||
sleep 1m
|
||||
# start I2PD
|
||||
/I2PD/i2pd --datadir /I2PD --conf /I2PD/i2pd.conf &
|
||||
wait -n
|
||||
exit $?
|
||||
Reference in New Issue
Block a user