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

Skip to content
Snippets Groups Projects
Dockerfile 1.05 KiB
Newer Older
  • Learn to ignore specific revisions
  • FROM alpine:3.17.1 as builder
    
    Zlatin Balevsky's avatar
    Zlatin Balevsky committed
    ENV APP_HOME="/i2p"
    
    LoveIsGrief's avatar
    LoveIsGrief committed
    WORKDIR /tmp/build
    
    Zlatin Balevsky's avatar
    Zlatin Balevsky committed
    COPY . .
    
    LoveIsGrief's avatar
    LoveIsGrief committed
    
    
    RUN apk add --virtual build-base gettext tar bzip2 apache-ant openjdk17 \
    
        && echo "build.built-by=Docker" >> override.properties \
    
    Zlatin Balevsky's avatar
    Zlatin Balevsky committed
        && ant preppkg-linux-only \
    
        && rm -rf pkg-temp/osid pkg-temp/lib/wrapper pkg-temp/lib/wrapper.* \
    
        && apk del build-base gettext tar bzip2 apache-ant openjdk17
    
    FROM alpine:3.17.1
    
    Zlatin Balevsky's avatar
    Zlatin Balevsky committed
    ENV APP_HOME="/i2p"
    
    LoveIsGrief's avatar
    LoveIsGrief committed
    
    
    RUN apk add openjdk17-jre ttf-dejavu
    
    
    Zlatin Balevsky's avatar
    Zlatin Balevsky committed
    WORKDIR ${APP_HOME}
    COPY --from=builder /tmp/build/pkg-temp .
    
    LoveIsGrief's avatar
    LoveIsGrief committed
    # "install" i2p by copying over installed files
    
    COPY --chown=root:root docker/rootfs/ /
    RUN chmod +x /startapp.sh
    
    Zlatin Balevsky's avatar
    Zlatin Balevsky committed
    # Mount home and snark
    
    Zlatin Balevsky's avatar
    Zlatin Balevsky committed
    VOLUME ["${APP_HOME}/.i2p"]
    
    Zlatin Balevsky's avatar
    Zlatin Balevsky committed
    VOLUME ["/i2psnark"]
    
    EXPOSE 7654 7656 7657 7658 4444 6668 7659 7660 4445 12345
    
    Zlatin Balevsky's avatar
    Zlatin Balevsky committed
    # 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"