Browse Source

Replace dockerfile to build gnunetrest, not gnunet

master
juga 2 years ago
parent
commit
b77874ce27
2 changed files with 17 additions and 60 deletions
  1. +17
    -57
      Dockerfile
  2. +0
    -3
      docker-entrypoint.sh

+ 17
- 57
Dockerfile View File

@ -1,57 +1,17 @@
FROM debian:buster-slim
RUN apt update && apt upgrade -y && \
apt install -y git libtool autoconf autopoint \
build-essential libgcrypt-dev libidn11-dev zlib1g-dev \
libunistring-dev libglpk-dev miniupnpc libextractor-dev \
libjansson-dev libcurl4-gnutls-dev gnutls-bin libsqlite3-dev \
openssl libnss3-tools libopus-dev libpulse-dev libogg-dev \
libargon2-dev libsodium-dev libgnutls28-dev htop wget \
python3-pip nano nmap && pip3 install requests
COPY pygnunetrest pygnunetrest
COPY testdata testdata
WORKDIR /
RUN echo "building libmicrohttpd" && \
/usr/bin/wget https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.71.tar.gz && \
/bin/tar -xf /libmicrohttpd-0.9.71.tar.gz && \
/bin/rm /libmicrohttpd-0.9.71.tar.gz
WORKDIR /libmicrohttpd-0.9.71
RUN autoreconf -fi && \
./configure --disable-doc --prefix=/opt/libmicrohttpd && \
make -j$(nproc || echo -n 1) && \
make install
WORKDIR /
RUN echo "building gnunet"
RUN /usr/bin/wget http://ftpmirror.gnu.org/gnunet/gnunet-0.13.3.tar.gz && \
/bin/tar -xf /gnunet-0.13.3.tar.gz && \
/bin/rm gnunet-0.13.3.tar.gz
WORKDIR /gnunet-0.13.3
ENV GNUNET_PREFIX=/usr/local
ENV CFLAGS="-g -Wall -O0"
RUN ./configure --prefix=$GNUNET_PREFIX --disable-documentation --enable-logging=verbose --with-microhttpd=/opt/libmicrohttpd && \
/usr/sbin/addgroup gnunet && \
/usr/sbin/addgroup gnunetdns && \
/usr/sbin/adduser --system --home /var/lib/gnunet gnunet && \
/usr/sbin/usermod -aG gnunet root && \
make -j$(nproc || echo -n 1) && \
make install
WORKDIR /
RUN mkdir /gnunet-config
RUN touch /gnunet-config/gnunet.conf
RUN mkdir -p /logs
RUN touch /logs/arm.log
ENV LD_LIBRARY_PATH=/usr/local/lib
COPY docker-entrypoint.sh /opt
ENV PATH="/usr/local/share/bin:$PATH"
ENTRYPOINT ["/opt/docker-entrypoint.sh"]
FROM debian:buster-slim as gnunetrest-deps
USER root
RUN apt update && \
apt-get -y install \
python3-requests \
python3-setuptools \
python3-pytest
FROM gnunetrest-deps as gnunetrest
ARG UID=1000
RUN apt update -y && apt install -y telnet netstat-nat iputils-ping procps
RUN addgroup --system gnunetdns && \
addgroup --system gnunet && \
adduser --system --uid $UID gnunet --ingroup gnunet
COPY --chown=gnunet:gnunet . /home/gnunet/pygnunetrest
WORKDIR /home/gnunet/pygnunetrest
RUN python3 setup.py develop
USER gnunet

+ 0
- 3
docker-entrypoint.sh View File

@ -1,3 +0,0 @@
#!/bin/bash
gnunet-arm -s -c /gnunet-config/gnunet.conf -L EVERYTHING -l /logs/arm.log
exec bash

Loading…
Cancel
Save