aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-11-20 19:51:25 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-11-20 19:51:25 +0900
commitaedaeb12857c9d661ff02d1e7f35a8685cf10dc3 (patch)
treec2c6e6ae182734c928f6195cbfe0ac839b89608d
parent56a3e354dba3b348e508359af6b43160f99d7df3 (diff)
parentef98176637b22fcae309f0caa990bcf38f41c5ce (diff)
downloadgnunet-aedaeb12857c9d661ff02d1e7f35a8685cf10dc3.tar.gz
gnunet-aedaeb12857c9d661ff02d1e7f35a8685cf10dc3.zip
Merge branch 'master' of git+ssh://git.gnunet.org/gnunet
-rw-r--r--contrib/docker/.dockerignore2
-rw-r--r--contrib/docker/Dockerfile79
-rw-r--r--contrib/docker/docker-entrypoint.sh16
-rw-r--r--contrib/docker/gnunet.conf21
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 @@
1Dockerfile
2
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 @@
1FROM ubuntu:20.04 1# FROM ubuntu:20.04
2FROM debian:stable
2 3
3ENV DEBIAN_FRONTEND noninteractive 4ENV DEBIAN_FRONTEND noninteractive
4 5
5# Install tools and dependencies 6# Install tools and dependencies
6RUN apt-get update 7RUN apt-get update && \
7RUN apt-get upgrade 8 apt-get upgrade && \
8RUN apt-get -y install --no-install-recommends \ 9 apt-get -y install --no-install-recommends \
10 apt-utils
11
12# Install tools and dependencies
13RUN apt-get update && \
14 apt-get upgrade && \
15 apt-get -y install --no-install-recommends \
9 ca-certificates \ 16 ca-certificates \
17 iptables \
18 python3 \
19 python3-pip \
20 iproute2 \
21 net-tools \
10 libsasl2-modules \ 22 libsasl2-modules \
11 git \ 23 git \
12 automake \ 24 automake \
@@ -50,44 +62,53 @@ RUN cd /tmp && \
50 cd jose-11 && \ 62 cd jose-11 && \
51 mkdir build && \ 63 mkdir build && \
52 cd build && \ 64 cd build && \
53 meson .. --prefix=/usr && \ 65 meson .. --prefix=/usr/local/lib && \
54 ninja && \ 66 ninja && \
55 ninja install && \ 67 ninja install && \
56 cd / && \ 68 cd / && \
57 rm -rf /tmp/jose-11/* 69 rm -rf /tmp/jose-11/*
58 70
59# Install GNUnet 71# Intall Python Packages for Documentation
60ENV GNUNET_PREFIX=/usr/local/lib 72RUN pip3 install \
61ENV CFLAGS '-g -Wall -O0' 73 docutils==0.17.1 \
74 sphinx \
75 sphinx-rtd-theme
76
77COPY . /tmp/gnunet
62 78
63COPY . /gnunet 79# ENV VERSION=0.18.1
64WORKDIR /gnunet 80# ENV HASH=719fc54734ee54c36ff619a6aa2d659655db012c40f9210c0859459c435fce1a
65RUN ./bootstrap --no-doc 81# RUN wget "ftpmirror.gnu.org/gnunet/gnunet-$VERSION.tar.gz" -P /tmp
66RUN ./configure \
67 --with-nssdir=/lib \
68 --prefix="$GNUNET_PREFIX/.." \
69 --enable-logging=verbose
70RUN make -j
71RUN make install
72RUN ldconfig
73WORKDIR /
74RUN rm -rf /gnunet
75 82
76# RUN cd /gnunet && \ 83# Check the gnunet download integrity
77# ./bootstrap && \ 84# RUN echo "$HASH /tmp/gnunet-$VERSION.tar.gz" | sha256sum --check --status
85
86# Extract gnunet
87# RUN mkdir /tmp/gnunet && tar xf "/tmp/gnunet-$VERSION.tar.gz" -C /tmp/gnunet --strip-components=1
88
89# Install gnunet
90# ENV GNUNET_PREFIX=/usr/local/lib
91# ENV CFLAGS '-g -Wall -O0'
92#
93# RUN cd /tmp/gnunet && \
78# ./configure \ 94# ./configure \
79# --with-nssdir=/lib \ 95# --prefix="$GNUNET_PREFIX/.." \
80# --prefix="$GNUNET_PREFIX" \
81# --enable-logging=verbose && \ 96# --enable-logging=verbose && \
82# make -j && \ 97# make -j && \
83# make install && \ 98# make install && \
84# ldconfig && \ 99# ldconfig
85# cd - && \ 100
86# rm -fr /gnunet 101RUN cd /tmp/gnunet && \
102 ./bootstrap && \
103 ./configure \
104 --prefix="$GNUNET_PREFIX/.." \
105 --enable-logging=verbose && \
106 make -j && \
107 make install && \
108 ldconfig
87 109
88# Configure GNUnet 110# Configure GNUnet
89COPY ./contrib/docker/gnunet.conf /etc/gnunet.conf 111RUN cp /tmp/gnunet/contrib/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
90COPY ./contrib/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
91RUN chmod 755 /usr/local/bin/docker-entrypoint 112RUN chmod 755 /usr/local/bin/docker-entrypoint
92 113
93ENV LOCAL_PORT_RANGE='40001 40200' 114ENV 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 @@
1#!/bin/bash -e 1#!/bin/bash -e
2 2
3echo "${LOCAL_PORT_RANGE:-49152 65535}" > /proc/sys/net/ipv4/ip_local_port_range 3exec gnunet-arm \
4sed -i 's/$GNUNET_PORT/'${GNUNET_PORT:-2086}'/g' /etc/gnunet.conf 4 --start \
5 5 --monitor
6if [[ $# -eq 0 ]]; then
7 exec gnunet-arm \
8 --config=/etc/gnunet.conf \
9 --start \
10 --monitor
11elif [[ -z $1 ]] || [[ ${1:0:1} == '-' ]]; then
12 exec gnunet-arm "$@"
13else
14 exec "$@"
15fi
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 @@
1[arm]
2SYSTEM_ONLY = NO
3USER_ONLY = NO
4
5[fs]
6FORCESTART = NO
7
8[nat]
9ENABLE_UPNP = NO
10BEHIND_NAT = YES
11
12[transport-tcp]
13PORT = $GNUNET_PORT
14ADVERTISED_PORT = $GNUNET_PORT
15
16[transport-udp]
17PORT = $GNUNET_PORT
18BROADCAST = YES
19
20[cadet]
21TESTING_IGNORE_KEYS = ACCEPT_FROM;