mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-19 21:52:27 +00:00
Bump SentryPeer to 1.4.1
This commit is contained in:
parent
73b54f5504
commit
aaef85c49d
7 changed files with 27 additions and 187 deletions
|
@ -1,59 +1,14 @@
|
|||
FROM alpine:3.15 as builder
|
||||
#
|
||||
RUN apk -U add --no-cache \
|
||||
autoconf \
|
||||
automake \
|
||||
autoconf-archive \
|
||||
build-base \
|
||||
curl-dev \
|
||||
cmocka-dev \
|
||||
git \
|
||||
jansson-dev \
|
||||
libmicrohttpd-dev \
|
||||
pcre2-dev \
|
||||
sqlite-dev \
|
||||
util-linux-dev
|
||||
#
|
||||
RUN apk -U add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
libosip2-dev
|
||||
#
|
||||
# Download SentryPeer sources and build
|
||||
RUN git clone https://github.com/SentryPeer/SentryPeer -b v1.2.0
|
||||
#
|
||||
WORKDIR /SentryPeer
|
||||
#
|
||||
RUN ./bootstrap.sh
|
||||
RUN ./configure --disable-opendht --disable-zyre
|
||||
RUN make
|
||||
RUN make check
|
||||
RUN make install
|
||||
#RUN tar cvfz sp.tgz /SentryPeer/* && \
|
||||
# mv sp.tgz /
|
||||
#
|
||||
FROM alpine:3.15
|
||||
#
|
||||
#COPY --from=builder /sp.tgz /root
|
||||
COPY --from=builder /SentryPeer/sentrypeer /opt/sentrypeer/
|
||||
FROM alpine:edge
|
||||
#
|
||||
# Install packages
|
||||
RUN apk -U add --no-cache \
|
||||
jansson \
|
||||
libmicrohttpd \
|
||||
libuuid \
|
||||
pcre2 \
|
||||
sqlite-libs && \
|
||||
apk -U add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
libosip2 && \
|
||||
#
|
||||
# Extract from builder
|
||||
# mkdir /opt/sentrypeer && \
|
||||
# tar xvfz /root/sp.tgz --strip-components=1 -C /opt/sentrypeer/ && \
|
||||
RUN apk -U add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
sentrypeer && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
mkdir -p /var/log/sentrypeer && \
|
||||
addgroup -g 2000 sentrypeer && \
|
||||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 sentrypeer && \
|
||||
chown -R sentrypeer:sentrypeer /opt/sentrypeer && \
|
||||
chown -R sentrypeer:sentrypeer /usr/bin/sentrypeer && \
|
||||
#
|
||||
# Clean up
|
||||
rm -rf /root/* && \
|
||||
|
@ -62,5 +17,4 @@ RUN apk -U add --no-cache \
|
|||
# Set workdir and start sentrypeer
|
||||
STOPSIGNAL SIGKILL
|
||||
USER sentrypeer:sentrypeer
|
||||
WORKDIR /opt/sentrypeer/
|
||||
CMD ./sentrypeer -jar -f /var/log/sentrypeer/sentrypeer.db -l /var/log/sentrypeer/sentrypeer.json
|
||||
CMD /usr/bin/sentrypeer -warpj -f /var/log/sentrypeer/sentrypeer.db -l /var/log/sentrypeer/sentrypeer.json
|
||||
|
|
|
@ -1,66 +1,39 @@
|
|||
FROM alpine:3.15 as builder
|
||||
FROM alpine:3.16 as builder
|
||||
#
|
||||
RUN apk -U add --no-cache \
|
||||
argon2-dev \
|
||||
autoconf \
|
||||
automake \
|
||||
autoconf-archive \
|
||||
build-base \
|
||||
curl-dev \
|
||||
cmocka-dev \
|
||||
czmq-dev \
|
||||
git \
|
||||
jansson-dev \
|
||||
libtool \
|
||||
libmicrohttpd-dev \
|
||||
pcre2-dev \
|
||||
readline-dev \
|
||||
sqlite-dev \
|
||||
util-linux-dev \
|
||||
zeromq-dev
|
||||
util-linux-dev
|
||||
#
|
||||
RUN apk -U add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
libosip2-dev
|
||||
RUN apk -U add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community \
|
||||
asio-dev \
|
||||
msgpack-c-dev \
|
||||
msgpack-cxx-dev
|
||||
#
|
||||
# Download and build Zyre
|
||||
WORKDIR /tmp
|
||||
RUN git clone https://github.com/savoirfairelinux/opendht dht
|
||||
WORKDIR /tmp/dht
|
||||
RUN ./autogen.sh
|
||||
RUN ./configure
|
||||
RUN make
|
||||
RUN make install
|
||||
RUN ldconfig /etc/ld.so.conf.d
|
||||
#
|
||||
WORKDIR /tmp
|
||||
RUN git clone --quiet https://github.com/zeromq/zyre zyre
|
||||
WORKDIR /tmp/zyre
|
||||
RUN ./autogen.sh 2> /dev/null
|
||||
RUN ./configure --quiet --without-docs
|
||||
RUN make
|
||||
RUN make install
|
||||
RUN ldconfig /etc/ld.so.conf.d
|
||||
libosip2-dev \
|
||||
opendht-dev
|
||||
#
|
||||
# Download SentryPeer sources and build
|
||||
WORKDIR /
|
||||
RUN git clone https://github.com/SentryPeer/SentryPeer.git
|
||||
RUN git clone https://github.com/SentryPeer/SentryPeer -b v1.4.1
|
||||
#
|
||||
WORKDIR /SentryPeer
|
||||
#
|
||||
RUN cp -R /tmp/dht/* .
|
||||
RUN sed -i '/AM_LDFLAGS=/d' Makefile.am
|
||||
RUN ./bootstrap.sh
|
||||
#RUN ./configure --disable-opendht --disable-zyre
|
||||
RUN ./configure
|
||||
RUN make CPPFLAGS=-D_POSIX_C_SOURCE=199309L
|
||||
RUN make
|
||||
RUN make check
|
||||
RUN make install
|
||||
RUN tar cvfz sp.tgz /SentryPeer/* && \
|
||||
mv sp.tgz /
|
||||
#RUN tar cvfz sp.tgz /SentryPeer/* && \
|
||||
# mv sp.tgz /
|
||||
#
|
||||
FROM alpine:3.15
|
||||
FROM alpine:3.16
|
||||
#
|
||||
#COPY --from=builder /sp.tgz /root
|
||||
COPY --from=builder /SentryPeer/sentrypeer /opt/sentrypeer/
|
||||
|
@ -73,7 +46,8 @@ RUN apk -U add --no-cache \
|
|||
pcre2 \
|
||||
sqlite-libs && \
|
||||
apk -U add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
libosip2 && \
|
||||
libosip2 \
|
||||
opendht-libs && \
|
||||
#
|
||||
# Extract from builder
|
||||
# mkdir /opt/sentrypeer && \
|
||||
|
@ -93,4 +67,4 @@ RUN apk -U add --no-cache \
|
|||
STOPSIGNAL SIGKILL
|
||||
USER sentrypeer:sentrypeer
|
||||
WORKDIR /opt/sentrypeer/
|
||||
CMD ./sentrypeer -draws
|
||||
CMD ./sentrypeer -warpj -f /var/log/sentrypeer/sentrypeer.db -l /var/log/sentrypeer/sentrypeer.json
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
FROM debian:bullseye as builder
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
#
|
||||
RUN apt-get update
|
||||
RUN apt-get dist-upgrade -y \
|
||||
autoconf \
|
||||
automake \
|
||||
autoconf-archive \
|
||||
build-essential \
|
||||
git \
|
||||
libcmocka-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libczmq-dev \
|
||||
libjansson-dev \
|
||||
libmicrohttpd-dev \
|
||||
libopendht-dev \
|
||||
libosip2-dev \
|
||||
libpcre2-dev \
|
||||
libsqlite3-dev \
|
||||
libtool
|
||||
#
|
||||
# Download and build OpenDHT
|
||||
WORKDIR /tmp
|
||||
RUN git clone https://github.com/savoirfairelinux/opendht opendht
|
||||
WORKDIR /tmp/opendht
|
||||
RUN ./autogen.sh
|
||||
RUN ./configure
|
||||
RUN make
|
||||
RUN make install
|
||||
RUN ldconfig
|
||||
#
|
||||
# Download and build Zyre
|
||||
WORKDIR /tmp
|
||||
RUN git clone https://github.com/zeromq/zyre -b v2.0.1 zyre
|
||||
WORKDIR /tmp/zyre
|
||||
RUN ./autogen.sh
|
||||
RUN ./configure --without-docs
|
||||
RUN make
|
||||
RUN make install
|
||||
RUN ldconfig
|
||||
#
|
||||
# Download and build SentryPeer
|
||||
WORKDIR /
|
||||
RUN git clone https://github.com/SentryPeer/SentryPeer -b v1.0.0
|
||||
#
|
||||
WORKDIR /SentryPeer
|
||||
#
|
||||
RUN cp -r /tmp/opendht .
|
||||
RUN ./bootstrap.sh
|
||||
RUN ./configure
|
||||
RUN make
|
||||
RUN make check
|
||||
RUN make install
|
||||
#RUN tar cvfz sp.tgz /SentryPeer/* && \
|
||||
# mv sp.tgz /
|
||||
#RUN exit 1
|
||||
#
|
||||
FROM debian:bullseye
|
||||
#
|
||||
#COPY --from=builder /sp.tgz /root
|
||||
COPY --from=builder /SentryPeer/sentrypeer /opt/sentrypeer/
|
||||
#
|
||||
# Install packages
|
||||
RUN apt-get update && \
|
||||
apt-get dist-upgrade -y && \
|
||||
apt-get install -y \
|
||||
libcmocka0 \
|
||||
libcurl4 \
|
||||
libczmq4 \
|
||||
libjansson4 \
|
||||
libmicrohttpd12 \
|
||||
libosip2-11 \
|
||||
libsqlite3-0 \
|
||||
pcre2-utils && \
|
||||
#
|
||||
# Extract from builder
|
||||
# mkdir /opt/sentrypeer && \
|
||||
# tar xvfz /root/sp.tgz --strip-components=1 -C /opt/sentrypeer/ && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
mkdir -p /var/log/sentrypeer && \
|
||||
addgroup --gid 2000 sentrypeer && \
|
||||
adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 sentrypeer && \
|
||||
chown -R sentrypeer:sentrypeer /opt/sentrypeer && \
|
||||
#
|
||||
# Clean up
|
||||
rm -rf /root/* && \
|
||||
apt-get autoremove -y --purge && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
#
|
||||
# Set workdir and start sentrypeer
|
||||
STOPSIGNAL SIGKILL
|
||||
USER sentrypeer:sentrypeer
|
||||
WORKDIR /opt/sentrypeer/
|
||||
CMD ./sentrypeer -draws
|
|
@ -15,8 +15,9 @@ services:
|
|||
networks:
|
||||
- sentrypeer_local
|
||||
ports:
|
||||
- "4222:4222/udp"
|
||||
- "5060:5060/udp"
|
||||
# - "127.0.0.1:8082:8082"
|
||||
- "127.0.0.1:8082:8082"
|
||||
image: "dtagdevsec/sentrypeer:2204"
|
||||
read_only: true
|
||||
volumes:
|
||||
|
|
|
@ -377,7 +377,9 @@ services:
|
|||
networks:
|
||||
- sentrypeer_local
|
||||
ports:
|
||||
# - "4222:4222/udp"
|
||||
- "5060:5060/udp"
|
||||
# - "127.0.0.1:8082:8082"
|
||||
image: "dtagdevsec/sentrypeer:2204"
|
||||
read_only: true
|
||||
volumes:
|
||||
|
|
|
@ -377,7 +377,9 @@ services:
|
|||
networks:
|
||||
- sentrypeer_local
|
||||
ports:
|
||||
# - "4222:4222/udp"
|
||||
- "5060:5060/udp"
|
||||
# - "127.0.0.1:8082:8082"
|
||||
image: "dtagdevsec/sentrypeer:2204"
|
||||
read_only: true
|
||||
volumes:
|
||||
|
|
|
@ -377,7 +377,9 @@ services:
|
|||
networks:
|
||||
- sentrypeer_local
|
||||
ports:
|
||||
# - "4222:4222/udp"
|
||||
- "5060:5060/udp"
|
||||
# - "127.0.0.1:8082:8082"
|
||||
image: "dtagdevsec/sentrypeer:2204"
|
||||
read_only: true
|
||||
volumes:
|
||||
|
|
Loading…
Reference in a new issue