Files
i2p.i2p/Dockerfile
idk d93cd27c2e
Some checks failed
Java CI / build (push) Has been cancelled
Java CI / javadoc-latest (push) Has been cancelled
Java CI / build-java7 (push) Has been cancelled
Dockerhub / docker (push) Has been cancelled
Java with IzPack Snapshot Setup / setup (push) Has been cancelled
Daily Workflow / daily-job (push) Failing after 6s
Daily Workflow / javadoc-latest (push) Failing after 6s
Daily Workflow / build-java7 (push) Failing after 5s
Sync Primary Repository to GitHub Mirror / sync (push) Has been cancelled
Update dockerfile, give up on temurin and use alpine instead
2025-05-23 00:15:12 -04:00

41 lines
1.1 KiB
Docker

FROM alpine:latest as builder
ENV APP_HOME="/i2p"
ARG ANT_VERSION="1.10.15"
WORKDIR /tmp/build
COPY . .
RUN apk add --no-cache gettext tar bzip2 curl openjdk21 \
&& echo "build.built-by=Docker" >> override.properties \
&& curl https://dlcdn.apache.org//ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.bz2 | tar -jxf - -C /opt \
&& /opt/apache-ant-${ANT_VERSION}/bin/ant preppkg-linux-only \
&& rm -rf pkg-temp/osid pkg-temp/lib/wrapper pkg-temp/lib/wrapper.*
FROM alpine:latest
ENV APP_HOME="/i2p"
RUN apk add openjdk21
WORKDIR ${APP_HOME}
COPY --from=builder /tmp/build/pkg-temp .
# "install" i2p by copying over installed files
COPY --chown=root:root docker/rootfs/ /
RUN chmod +x /startapp.sh
# Mount home and snark
VOLUME ["${APP_HOME}/.i2p"]
VOLUME ["/i2psnark"]
EXPOSE 7654 7656 7657 7658 4444 6668 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"
ENTRYPOINT ["/startapp.sh"]