I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 987bff00 authored by Zlatin Balevsky's avatar Zlatin Balevsky
Browse files

Merge branch 'docker-2' into 'master'

More Docker changes

See merge request !28
parents 20c528de 8fa70c9c
No related branches found
No related tags found
1 merge request!28More Docker changes
FROM jlesage/baseimage:alpine-3.10-glibc
FROM jlesage/baseimage:alpine-3.10-glibc as builder
ENV APP_HOME="/i2p"
WORKDIR /tmp/build
COPY . .
# Build package
RUN add-pkg openjdk8-jre
RUN add-pkg --virtual build-base gettext tar bzip2 apache-ant openjdk8
RUN echo "noExe=true" >> build.properties
RUN ant clean pkg
RUN del-pkg build-base gettext tar bzip2 apache-ant openjdk8
RUN add-pkg --virtual build-base gettext tar bzip2 apache-ant openjdk8 \
&& ant preppkg-linux-only \
&& del-pkg build-base gettext tar bzip2 apache-ant openjdk8
FROM jlesage/baseimage:alpine-3.10-glibc
ENV APP_HOME="/i2p"
# "install" files
RUN mkdir -p ${APP_HOME}
RUN mv pkg-temp/* ${APP_HOME}
RUN add-pkg openjdk8-jre
WORKDIR ${APP_HOME}
COPY --from=builder /tmp/build/pkg-temp .
# "install" i2p by copying over installed files
COPY docker/rootfs/ /
# Mount home
# Mount home and snark
VOLUME ["${APP_HOME}/.i2p"]
VOLUME ["/i2psnark"]
EXPOSE 7654 7656 7657 7658 4444 6668 8998 7659 7660 4445
EXPOSE 7654 7656 7657 7658 4444 6668 8998 7659 7660 4445 12345
# Metadata.
LABEL \
......@@ -30,3 +32,4 @@ LABEL \
org.label-schema.version="1.0" \
org.label-schema.vcs-url="https://github.com/i2p/i2p.i2p" \
org.label-schema.schema-version="1.0"
# 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
router.updateDisabled=true
i2np.ntcp.port=12345
i2np.udp.port=12345
i2np.udp.internalPort=12345
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment