More Docker changes:

* disable in-network updates
* persistent directory for snark downloads
* listen on port 12345 for i2np connections
* restore multi-stage build
* use better ant target
* allow passing -Xmx via the JVM_XMX variable

Many thanks to LoveIsGrief for the suggestions!
This commit is contained in:
Zlatin Balevsky
2021-04-28 04:12:24 +00:00
parent 20c528debe
commit 8fa70c9cde
4 changed files with 39 additions and 13 deletions

View File

@@ -0,0 +1,12 @@
# NOTE: This I2P config file must use UTF-8 encoding
#
# If you have a 'split' directory installation, with configuration
# files in ~/.i2p (Linux), %LOCALAPPDATA%\I2P (Windows),
# or /Users/(user)/Library/Application Support/i2p (Mac), be sure to
# edit the file in the configuration directory, NOT the install directory.
# When running as a Linux daemon, the configuration directory is /var/lib/i2p
# and the install directory is /usr/share/i2p .
# When running as a Windows service, the configuration directory is \ProgramData\i2p
# and the install directory is \Program Files\i2p .
#
i2psnark.dir=/i2psnark

View File

@@ -0,0 +1,4 @@
router.updateDisabled=true
i2np.ntcp.port=12345
i2np.udp.port=12345
i2np.udp.internalPort=12345

View File

@@ -1,6 +1,13 @@
#!/bin/sh
set -e
if [ -z $JVM_XMX ]; then
echo "*** Defaulting to 512MB JVM heap limit"
echo "*** You can override that value with the JVM_XMX variable"
echo "*** (for example JVM_XMX=256m)"
JVM_XMX=512m
fi
# Explicitly define HOME otherwise it might not have been set
export HOME=/i2p
@@ -15,7 +22,7 @@ for jar in `ls lib/*.jar`; do
CLASSPATH=${CLASSPATH}:${jar}
done
JAVAOPTS="-Djava.net.preferIPv4Stack=false -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -Di2p.dir.config=${HOME}/.i2p -DloggerFilenameOverride=logs/log-router-@.txt"
JAVAOPTS="-Djava.net.preferIPv4Stack=false -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -Di2p.dir.config=${HOME}/.i2p -DloggerFilenameOverride=logs/log-router-@.txt -Xmx$JVM_XMX"
java -cp "${CLASSPATH}" ${JAVA_OPTS} net.i2p.router.RouterLaunch