gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit ef98176637b22fcae309f0caa990bcf38f41c5ce
parent f2b264a16c3c9a4199876740a210496e63b0bea4
Author: Tristan Schwieren <tristan.schwieren@tum.de>
Date:   Thu, 17 Nov 2022 15:58:04 +0100

-Fixed the Docker container

Diffstat:
Acontrib/docker/.dockerignore | 2++
Mcontrib/docker/Dockerfile | 79++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
Mcontrib/docker/docker-entrypoint.sh | 16+++-------------
Dcontrib/docker/gnunet.conf | 21---------------------
4 files changed, 55 insertions(+), 63 deletions(-)

diff --git a/contrib/docker/.dockerignore b/contrib/docker/.dockerignore @@ -0,0 +1,2 @@ +Dockerfile + diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile @@ -1,12 +1,24 @@ -FROM ubuntu:20.04 +# FROM ubuntu:20.04 +FROM debian:stable ENV DEBIAN_FRONTEND noninteractive # Install tools and dependencies -RUN apt-get update -RUN apt-get upgrade -RUN apt-get -y install --no-install-recommends \ +RUN apt-get update && \ + apt-get upgrade && \ + apt-get -y install --no-install-recommends \ + apt-utils + +# Install tools and dependencies +RUN apt-get update && \ + apt-get upgrade && \ + apt-get -y install --no-install-recommends \ ca-certificates \ + iptables \ + python3 \ + python3-pip \ + iproute2 \ + net-tools \ libsasl2-modules \ git \ automake \ @@ -50,44 +62,53 @@ RUN cd /tmp && \ cd jose-11 && \ mkdir build && \ cd build && \ - meson .. --prefix=/usr && \ + meson .. --prefix=/usr/local/lib && \ ninja && \ ninja install && \ cd / && \ rm -rf /tmp/jose-11/* -# Install GNUnet -ENV GNUNET_PREFIX=/usr/local/lib -ENV CFLAGS '-g -Wall -O0' +# Intall Python Packages for Documentation +RUN pip3 install \ + docutils==0.17.1 \ + sphinx \ + sphinx-rtd-theme + +COPY . /tmp/gnunet -COPY . /gnunet -WORKDIR /gnunet -RUN ./bootstrap --no-doc -RUN ./configure \ - --with-nssdir=/lib \ - --prefix="$GNUNET_PREFIX/.." \ - --enable-logging=verbose -RUN make -j -RUN make install -RUN ldconfig -WORKDIR / -RUN rm -rf /gnunet +# ENV VERSION=0.18.1 +# ENV HASH=719fc54734ee54c36ff619a6aa2d659655db012c40f9210c0859459c435fce1a +# RUN wget "ftpmirror.gnu.org/gnunet/gnunet-$VERSION.tar.gz" -P /tmp -# RUN cd /gnunet && \ -# ./bootstrap && \ +# Check the gnunet download integrity +# RUN echo "$HASH /tmp/gnunet-$VERSION.tar.gz" | sha256sum --check --status + +# Extract gnunet +# RUN mkdir /tmp/gnunet && tar xf "/tmp/gnunet-$VERSION.tar.gz" -C /tmp/gnunet --strip-components=1 + +# Install gnunet +# ENV GNUNET_PREFIX=/usr/local/lib +# ENV CFLAGS '-g -Wall -O0' +# +# RUN cd /tmp/gnunet && \ # ./configure \ -# --with-nssdir=/lib \ -# --prefix="$GNUNET_PREFIX" \ +# --prefix="$GNUNET_PREFIX/.." \ # --enable-logging=verbose && \ # make -j && \ # make install && \ -# ldconfig && \ -# cd - && \ -# rm -fr /gnunet +# ldconfig + +RUN cd /tmp/gnunet && \ + ./bootstrap && \ + ./configure \ + --prefix="$GNUNET_PREFIX/.." \ + --enable-logging=verbose && \ + make -j && \ + make install && \ + ldconfig # Configure GNUnet -COPY ./contrib/docker/gnunet.conf /etc/gnunet.conf -COPY ./contrib/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint +RUN cp /tmp/gnunet/contrib/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint RUN chmod 755 /usr/local/bin/docker-entrypoint ENV LOCAL_PORT_RANGE='40001 40200' diff --git a/contrib/docker/docker-entrypoint.sh b/contrib/docker/docker-entrypoint.sh @@ -1,15 +1,5 @@ #!/bin/bash -e -echo "${LOCAL_PORT_RANGE:-49152 65535}" > /proc/sys/net/ipv4/ip_local_port_range -sed -i 's/$GNUNET_PORT/'${GNUNET_PORT:-2086}'/g' /etc/gnunet.conf - -if [[ $# -eq 0 ]]; then - exec gnunet-arm \ - --config=/etc/gnunet.conf \ - --start \ - --monitor -elif [[ -z $1 ]] || [[ ${1:0:1} == '-' ]]; then - exec gnunet-arm "$@" -else - exec "$@" -fi +exec gnunet-arm \ + --start \ + --monitor diff --git a/contrib/docker/gnunet.conf b/contrib/docker/gnunet.conf @@ -1,21 +0,0 @@ -[arm] -SYSTEM_ONLY = NO -USER_ONLY = NO - -[fs] -FORCESTART = NO - -[nat] -ENABLE_UPNP = NO -BEHIND_NAT = YES - -[transport-tcp] -PORT = $GNUNET_PORT -ADVERTISED_PORT = $GNUNET_PORT - -[transport-udp] -PORT = $GNUNET_PORT -BROADCAST = YES - -[cadet] -TESTING_IGNORE_KEYS = ACCEPT_FROM;