mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 20:42:11 +00:00
heralding tweaking
This commit is contained in:
parent
3b852385d3
commit
94af9493b1
3 changed files with 26 additions and 24 deletions
|
@ -4,46 +4,50 @@ FROM alpine
|
||||||
ADD dist/ /root/dist/
|
ADD dist/ /root/dist/
|
||||||
|
|
||||||
# Install packages
|
# Install packages
|
||||||
RUN apk -U upgrade && \
|
RUN apk -U --no-cache add \
|
||||||
apk add bash \
|
build-base \
|
||||||
build-base \
|
git \
|
||||||
git \
|
libcap \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libressl-dev \
|
libressl-dev \
|
||||||
postgresql-dev \
|
postgresql-dev \
|
||||||
procps \
|
python3 \
|
||||||
python3 \
|
python3-dev \
|
||||||
python3-dev \
|
py-virtualenv && \
|
||||||
py-virtualenv && \
|
pip3 install --no-cache-dir --upgrade pip && \
|
||||||
pip3 install --upgrade pip && \
|
|
||||||
|
|
||||||
# Setup heralding
|
# Setup heralding
|
||||||
mkdir -p /opt && \
|
mkdir -p /opt && \
|
||||||
cd /opt/ && \
|
cd /opt/ && \
|
||||||
git clone https://github.com/johnnykv/heralding && \
|
git clone --depth=1 https://github.com/johnnykv/heralding && \
|
||||||
cd heralding && \
|
cd heralding && \
|
||||||
pip3 install -r requirements.txt && \
|
pip3 install --no-cache-dir -r requirements.txt && \
|
||||||
pip3 install heralding && \
|
pip3 install --no-cache-dir heralding && \
|
||||||
|
|
||||||
# Setup user, groups and configs
|
# Setup user, groups and configs
|
||||||
addgroup -g 2000 heralding && \
|
addgroup -g 2000 heralding && \
|
||||||
adduser -S -H -s /bin/bash -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.6 && \
|
||||||
|
chown -R heralding:heralding /var/log/heralding && \
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge \
|
apk del --purge \
|
||||||
build-base \
|
build-base \
|
||||||
git \
|
git \
|
||||||
|
libcap \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libressl-dev \
|
libressl-dev \
|
||||||
postgresql-dev \
|
postgresql-dev \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
py-virtualenv && \
|
py-virtualenv && \
|
||||||
apk add libzmq && \
|
apk add libzmq && \
|
||||||
rm -rf /root/* && \
|
rm -rf /root/* \
|
||||||
rm -rf /var/cache/apk/*
|
/var/cache/apk/* \
|
||||||
|
/opt/heralding
|
||||||
|
|
||||||
# Start elasticpot
|
# Start elasticpot
|
||||||
WORKDIR /tmp/heralding/
|
WORKDIR /tmp/heralding/
|
||||||
|
USER heralding:heralding
|
||||||
CMD exec heralding -c /etc/heralding/heralding.yml -l /var/log/heralding/heralding.log
|
CMD exec heralding -c /etc/heralding/heralding.yml -l /var/log/heralding/heralding.log
|
||||||
|
|
2
docker/heralding/dist/heralding.yml
vendored
2
docker/heralding/dist/heralding.yml
vendored
|
@ -120,7 +120,7 @@ capabilities:
|
||||||
|
|
||||||
https:
|
https:
|
||||||
enabled: true
|
enabled: true
|
||||||
port: 8443
|
port: 443
|
||||||
timeout: 30
|
timeout: 30
|
||||||
protocol_specific_data:
|
protocol_specific_data:
|
||||||
banner: ""
|
banner: ""
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
version: '2.2'
|
version: '2.3'
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
heralding_local:
|
heralding_local:
|
||||||
|
@ -11,10 +11,8 @@ services:
|
||||||
container_name: heralding
|
container_name: heralding
|
||||||
restart: always
|
restart: always
|
||||||
stop_signal: SIGINT
|
stop_signal: SIGINT
|
||||||
environment:
|
|
||||||
- PYTHON_EGG_CACHE=/tmp/heralding
|
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /tmp/heralding:exec
|
- /tmp/heralding:uid=2000,gid=2000
|
||||||
networks:
|
networks:
|
||||||
- heralding_local
|
- heralding_local
|
||||||
ports:
|
ports:
|
||||||
|
@ -25,7 +23,7 @@ services:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "110:110"
|
- "110:110"
|
||||||
- "143:143"
|
- "143:143"
|
||||||
- "8443:8443"
|
- "443:443"
|
||||||
- "993:993"
|
- "993:993"
|
||||||
- "995:995"
|
- "995:995"
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
|
|
Loading…
Reference in a new issue