I2P Layer of diva.exchange. Based on i2pd, see https://github.com/PurpleI2P/i2pd https://diva.exchange
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

99 lines
2.6 KiB

  1. FROM alpine:latest
  2. LABEL author="Konrad Baechler <konrad@diva.exchange>" \
  3. maintainer="Konrad Baechler <konrad@diva.exchange>" \
  4. name="diva-i2p" \
  5. description="Distributed digital value exchange upholding security, reliability and privacy" \
  6. url="https://diva.exchange"
  7. COPY conf/ /home/i2pd/conf/
  8. COPY network/ /home/i2pd/network/
  9. COPY htdocs/ /home/i2pd/htdocs/
  10. COPY certificates/ /home/i2pd/data/certificates/
  11. COPY entrypoint.sh /home/i2pd/
  12. # install deps && build i2p binary
  13. RUN mkdir /home/i2pd/tunnels.null \
  14. && mkdir /home/i2pd/tunnels.source.conf.d \
  15. && mkdir /home/i2pd/tunnels.conf.d \
  16. && mkdir /home/i2pd/bin \
  17. && apk --no-cache --virtual build-dependendencies add \
  18. cmake \
  19. make \
  20. gcc \
  21. g++ \
  22. binutils \
  23. libtool \
  24. libev-dev \
  25. check-dev \
  26. zlib-dev \
  27. boost-dev \
  28. build-base \
  29. openssl-dev \
  30. openssl \
  31. git \
  32. autoconf \
  33. automake \
  34. && cd /tmp \
  35. && git clone -b openssl https://github.com/PurpleI2P/i2pd.git \
  36. && cd /tmp/i2pd/build \
  37. && cmake -DWITH_AESNI=ON -DWITH_AVX=ON . \
  38. && make \
  39. && strip i2pd \
  40. && mv /tmp/i2pd/build/i2pd /home/i2pd/bin/i2pd \
  41. && mv /tmp/i2pd/LICENSE /home/i2pd/LICENSE \
  42. && mv /tmp/i2pd/ChangeLog /home/i2pd/ChangeLog \
  43. # stubby, DNS-over-TLS client
  44. # build required libyaml
  45. && cd /tmp \
  46. && git clone https://github.com/yaml/libyaml.git \
  47. && cd libyaml \
  48. && ./bootstrap \
  49. && ./configure \
  50. && make install \
  51. # build getndns/stubby
  52. && cd /tmp \
  53. && git clone https://github.com/getdnsapi/getdns.git \
  54. && cd getdns \
  55. && git checkout master \
  56. && git submodule update --init \
  57. && mkdir build \
  58. && cd build \
  59. && cmake -DENABLE_STUB_ONLY=ON -DBUILD_STUBBY=ON -DUSE_LIBIDN2=OFF .. \
  60. && make \
  61. && strip stubby/stubby \
  62. && chmod 0700 stubby/stubby \
  63. && mv stubby/stubby /usr/local/bin/stubby \
  64. # clean up /tmp
  65. && cd /home/i2pd \
  66. && rm -rf /tmp/i2pd \
  67. && rm -rf /tmp/libyaml \
  68. && rm -rf /tmp/getdns \
  69. # remove build dependencies
  70. && apk --no-cache --purge del build-dependendencies \
  71. # i2p and stubby runtime dependencies
  72. && apk --no-cache add \
  73. boost-filesystem \
  74. boost-system \
  75. boost-program_options \
  76. boost-date_time \
  77. boost-thread \
  78. boost-iostreams \
  79. openssl \
  80. musl-utils \
  81. libstdc++ \
  82. libev \
  83. sed \
  84. && addgroup -g 1000 i2pd \
  85. && adduser -u 1000 -G i2pd -s /bin/sh -h "/home/i2pd" -D i2pd \
  86. && chown -R i2pd:i2pd /home/i2pd \
  87. && chmod 0700 /home/i2pd/bin/i2pd \
  88. && chmod +x /home/i2pd/entrypoint.sh
  89. # 7070 I2P webconsole, 4444 I2P http proxy, 4445 I2P socks proxy
  90. EXPOSE 7070 4444 4445
  91. VOLUME [ "/home/i2pd/" ]
  92. WORKDIR "/home/i2pd/"
  93. ENTRYPOINT ["/home/i2pd/entrypoint.sh"]