Files
i2p.i2p/Dockerfile
Zlatin Balevsky 8fa70c9cde 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!
2021-04-28 04:12:24 +00:00

36 lines
901 B
Docker

FROM jlesage/baseimage:alpine-3.10-glibc as builder
ENV APP_HOME="/i2p"
WORKDIR /tmp/build
COPY . .
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"
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 and snark
VOLUME ["${APP_HOME}/.i2p"]
VOLUME ["/i2psnark"]
EXPOSE 7654 7656 7657 7658 4444 6668 8998 7659 7660 4445 12345
# Metadata.
LABEL \
org.label-schema.name="i2p" \
org.label-schema.description="Docker container for I2P" \
org.label-schema.version="1.0" \
org.label-schema.vcs-url="https://github.com/i2p/i2p.i2p" \
org.label-schema.schema-version="1.0"