gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: -Fixed the Docker container


From: gnunet
Subject: [gnunet] branch master updated: -Fixed the Docker container
Date: Thu, 17 Nov 2022 15:59:09 +0100

This is an automated email from the git hooks/post-receive script.

trizuz pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new ef9817663 -Fixed the Docker container
ef9817663 is described below

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

    -Fixed the Docker container
---
 contrib/docker/.dockerignore        |  2 +
 contrib/docker/Dockerfile           | 79 +++++++++++++++++++++++--------------
 contrib/docker/docker-entrypoint.sh | 16 ++------
 contrib/docker/gnunet.conf          | 21 ----------
 4 files changed, 55 insertions(+), 63 deletions(-)

diff --git a/contrib/docker/.dockerignore b/contrib/docker/.dockerignore
new file mode 100644
index 000000000..c9c567673
--- /dev/null
+++ b/contrib/docker/.dockerignore
@@ -0,0 +1,2 @@
+Dockerfile
+
diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile
index 55f86149a..de087df71 100644
--- 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
index 7f98ef68b..7613c6b65 100644
--- 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
deleted file mode 100644
index c8299ef46..000000000
--- a/contrib/docker/gnunet.conf
+++ /dev/null
@@ -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;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]