make heralding work with py3.10+

This commit is contained in:
Marco Ochse 2024-02-14 22:47:41 +01:00
parent e94f70a15f
commit 380ade13a3
3 changed files with 19 additions and 18 deletions

View file

@ -1,21 +1,20 @@
FROM alpine:3.15 FROM alpine:3.18
# #
# Include dist # Include dist
COPY dist/ /root/dist/ COPY dist/ /root/dist/
# #
# Install packages # Install packages
RUN apk -U --no-cache add \ RUN apk -U --no-cache add \
build-base \ build-base \
git \ git \
libcap \ libcap \
libffi-dev \ libffi-dev \
openssl-dev \ openssl-dev \
py3-pyzmq \ py3-pyzmq \
postgresql-dev \ postgresql-dev \
py3-attrs \ py3-attrs \
py3-mysqlclient \ py3-mysqlclient \
py3-nose \ py3-nose \
py3-openssl \
py3-pip \ py3-pip \
py3-psycopg2 \ py3-psycopg2 \
py3-pycryptodome \ py3-pycryptodome \
@ -25,15 +24,16 @@ RUN apk -U --no-cache add \
py3-typing-extensions \ py3-typing-extensions \
py3-wheel \ py3-wheel \
py3-yaml \ py3-yaml \
python3 \ python3 \
python3-dev && \ python3-dev && \
# #
# Setup heralding # Setup heralding
mkdir -p /opt && \ mkdir -p /opt && \
cd /opt/ && \ cd /opt/ && \
git clone https://github.com/johnnykv/heralding && \ # git clone https://github.com/johnnykv/heralding && \
git clone https://github.com/t3chn0m4g3/heralding && \
cd heralding && \ cd heralding && \
git checkout c31f99c55c7318c09272d8d9998e560c3d4de9aa && \ git checkout 319065810d6e8ba62fb696a96584ac7500752380 && \
cp /root/dist/requirements.txt . && \ cp /root/dist/requirements.txt . && \
pip3 install --upgrade pip && \ pip3 install --upgrade pip && \
pip3 install --no-cache-dir -r requirements.txt && \ pip3 install --no-cache-dir -r requirements.txt && \
@ -44,7 +44,7 @@ RUN apk -U --no-cache add \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 heralding && \ adduser -S -H -s /bin/ash -u 2000 -D -g 2000 heralding && \
mkdir -p /var/log/heralding/ /etc/heralding && \ mkdir -p /var/log/heralding/ /etc/heralding && \
mv /root/dist/heralding.yml /etc/heralding/ && \ mv /root/dist/heralding.yml /etc/heralding/ && \
setcap cap_net_bind_service=+ep /usr/bin/python3.9 && \ setcap cap_net_bind_service=+ep /usr/bin/python3.11 && \
chown -R heralding:heralding /var/log/heralding && \ chown -R heralding:heralding /var/log/heralding && \
# #
# Clean up # Clean up
@ -53,7 +53,7 @@ RUN apk -U --no-cache add \
git \ git \
libcap \ libcap \
libffi-dev \ libffi-dev \
libressl-dev \ openssl-dev \
postgresql-dev \ postgresql-dev \
python3-dev && \ python3-dev && \
rm -rf /root/* \ rm -rf /root/* \

View file

@ -2,3 +2,4 @@ aiosmtpd
asyncssh>=2.0.0 asyncssh>=2.0.0
pyaml pyaml
hpfeeds3 hpfeeds3
pyOpenSSL

View file

@ -36,4 +36,4 @@ services:
image: "dtagdevsec/heralding:alpha" image: "dtagdevsec/heralding:alpha"
read_only: true read_only: true
volumes: volumes:
- /data/heralding/log:/var/log/heralding - $HOME/tpotce/data/heralding/log:/var/log/heralding