forked from I2P_Developers/i2p.i2p
Keep running into
debian-binary:
[exec] dh patch --with systemd,bash-completion
[exec] dpkg: warning: --compare-versions used with obsolete relation operator '>'
[exec] dh: Unknown sequence patch (choose from: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep)
[exec] make: *** [debian/rules:54: patch] Error 255
41 lines
1.3 KiB
Docker
41 lines
1.3 KiB
Docker
# Use a multi-stage build to reduce the size of the resulting image
|
|
# We need alpine >v3 in order to install an apache-ant > 1.9
|
|
FROM debian:buster-slim as builder
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Build installer
|
|
RUN apt-get update \
|
|
# Workaround for installing openjdk-11-jre-headless
|
|
&& mkdir -p /usr/share/man/man1 \
|
|
&& apt-get -qqqy install debhelper ant debconf gettext libgmp-dev po-debconf fakeroot \
|
|
build-essential quilt dh-apparmor dh-systemd libservice-wrapper-java libjson-simple-java \
|
|
devscripts libjetty9-java libtomcat9-java libtaglibs-standard-jstlel-java libgetopt-java \
|
|
bash-completion
|
|
|
|
WORKDIR /tmp/build
|
|
COPY . ./
|
|
|
|
RUN ant debian
|
|
|
|
# Second stage only using the installer from the last stage
|
|
# ---------------------------------------------------------
|
|
# We can't use alpine here as the java service wrapper is built with glibc
|
|
# alpine uses musl
|
|
FROM openjdk:11.0-jre-slim
|
|
|
|
# "install" i2p by copying over installed files
|
|
COPY --from=builder /tmp/*.deb /tmp/
|
|
|
|
# Install and configure
|
|
RUN apt-get update -qqq \
|
|
&& apt-get -qqqy install geoip-database famfamfam-flag-png \
|
|
&& dpkb -i /tmp/*
|
|
|
|
EXPOSE 7654 7656 7657 7658 4444 6668 8998 7659 7660 4445 15000-20000
|
|
|
|
USER i2psvc
|
|
ENTRYPOINT [ "/usr/bin/i2prouter" ]
|
|
CMD start
|
|
|