Dockerfile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. FROM ubuntu:18.04
  2. ENV DEBIAN_FRONTEND noninteractive
  3. # Install tools and dependencies
  4. RUN apt-get update && \
  5. apt-get -y install --no-install-recommends \
  6. ca-certificates \
  7. libsasl2-modules \
  8. git \
  9. automake \
  10. autopoint \
  11. autoconf \
  12. texinfo \
  13. libtool \
  14. libltdl-dev \
  15. libgpg-error-dev \
  16. libidn11-dev \
  17. libunistring-dev \
  18. libglpk-dev \
  19. libbluetooth-dev \
  20. libextractor-dev \
  21. libmicrohttpd-dev \
  22. libgnutls28-dev \
  23. libgcrypt20-dev \
  24. libpq-dev \
  25. libsqlite3-dev \
  26. wget && \
  27. apt-get clean all && \
  28. apt-get -y autoremove && \
  29. rm -rf \
  30. /var/lib/apt/lists/* \
  31. /tmp/*
  32. # Install GNUrl
  33. ENV GNURL_VERSION=7.57.0
  34. RUN wget -O /tmp/gnurl.tar.xz https://ftpmirror.gnu.org/gnu/gnunet/gnurl-${GNURL_VERSION}.tar.xz
  35. RUN cd /tmp && \
  36. tar xvf gnurl.tar.xz && \
  37. cd gnurl-${GNURL_VERSION} && \
  38. autoreconf -i && \
  39. ./configure \
  40. --enable-ipv6 \
  41. --with-gnutls \
  42. --without-libssh2 \
  43. --without-libmetalink \
  44. --without-winidn \
  45. --without-librtmp \
  46. --without-nghttp2 \
  47. --without-nss \
  48. --without-cyassl \
  49. --without-polarssl \
  50. --without-ssl \
  51. --without-winssl \
  52. --without-darwinssl \
  53. --disable-sspi \
  54. --disable-ntlm-wb \
  55. --disable-ldap \
  56. --disable-rtsp \
  57. --disable-dict \
  58. --disable-telnet \
  59. --disable-tftp \
  60. --disable-pop3 \
  61. --disable-imap \
  62. --disable-smtp \
  63. --disable-gopher \
  64. --disable-file \
  65. --disable-ftp \
  66. --disable-smb && \
  67. make install && \
  68. cd - && \
  69. rm -rf /tmp/gnurl*
  70. # Install GNUnet
  71. ENV GNUNET_PREFIX /usr/local/gnunet
  72. ENV CFLAGS '-g -Wall -O0'
  73. COPY . /gnunet
  74. RUN cd /gnunet && \
  75. ./bootstrap && \
  76. ./configure \
  77. --with-nssdir=/lib \
  78. --prefix="$GNUNET_PREFIX" \
  79. --enable-logging=verbose && \
  80. make -j3 && \
  81. make install && \
  82. ldconfig && \
  83. cd - && \
  84. rm -fr /gnunet
  85. # Configure GNUnet
  86. COPY ./contrib/docker/gnunet.conf /etc/gnunet.conf
  87. COPY ./contrib/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
  88. RUN chmod 755 /usr/local/bin/docker-entrypoint
  89. ENV LOCAL_PORT_RANGE='40001 40200'
  90. ENV PATH "$GNUNET_PREFIX/bin:/usr/local/bin:$PATH"
  91. ENTRYPOINT ["docker-entrypoint"]