Compare commits

...

8 Commits

3 changed files with 36 additions and 11 deletions

View File

@ -1,27 +1,36 @@
FROM jlesage/baseimage:alpine-3.10-glibc
### CHANGE THIS!!! #####
# This is the port I2P will listen on for incoming connections.
# If you leave it as 12345 others will be able to guess you are
# running a docker image!
ENV I2NP_PORT=12345
########################
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
# "install" files
RUN mkdir -p ${APP_HOME}
RUN mv pkg-temp/* ${APP_HOME}
RUN add-pkg openjdk8-jre \
&& add-pkg --virtual build-base gettext tar bzip2 apache-ant openjdk8 \
&& ant clean preppkg-linux-only \
&& del-pkg build-base gettext tar bzip2 apache-ant openjdk8 \
&& mkdir -p ${APP_HOME} \
&& mv pkg-temp/* ${APP_HOME}
# "install" i2p by copying over installed files
COPY docker/rootfs/ /
RUN cat /i2p/router.config.template | sed "s/I2NP_PORT/${I2NP_PORT}/g" > /i2p/router.config
# 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 ${I2NP_PORT}
# Metadata.
LABEL \

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=I2NP_PORT
i2np.udp.port=I2NP_PORT
i2np.udp.internalPort=I2NP_PORT