mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
bump glutton to latest master
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
FROM golang:1.21-alpine as builder
|
||||
FROM golang:1.23-alpine AS builder
|
||||
#
|
||||
# Include dist
|
||||
COPY dist/ /root/dist/
|
||||
@ -16,34 +16,27 @@ RUN apk -U --no-cache add \
|
||||
cd /opt/ && \
|
||||
git clone https://github.com/mushorg/glutton && \
|
||||
cd /opt/glutton/ && \
|
||||
git checkout c1204c65ce32bfdc0e08fb2a9abe89b3b8eeed62 && \
|
||||
git checkout b3b5944b79893ccb1da19e112571674841bbe124 && \
|
||||
cp /root/dist/system.go . && \
|
||||
make build && \
|
||||
mv /root/dist/config.yaml /opt/glutton/config/
|
||||
cp /root/dist/*.yaml /opt/glutton/config/
|
||||
#
|
||||
FROM alpine:3.19
|
||||
FROM alpine:3.20
|
||||
#
|
||||
COPY --from=builder /opt/glutton/bin /opt/glutton/bin
|
||||
COPY --from=builder /opt/glutton/config /opt/glutton/config
|
||||
COPY --from=builder /opt/glutton/rules /opt/glutton/rules
|
||||
#
|
||||
RUN apk -U --no-cache add \
|
||||
iptables-dev \
|
||||
RUN apk -U --no-cache upgrade && \
|
||||
apk -U --no-cache add \
|
||||
iptables \
|
||||
libcap \
|
||||
libpcap-dev && \
|
||||
setcap cap_net_admin,cap_net_raw=+ep /opt/glutton/bin/server && \
|
||||
setcap cap_net_admin,cap_net_raw=+ep /sbin/xtables-nft-multi && \
|
||||
mkdir -p /var/log/glutton \
|
||||
/opt/glutton/payloads && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 glutton && \
|
||||
adduser -S -s /bin/ash -u 2000 -D -g 2000 glutton && \
|
||||
#
|
||||
# Clean up
|
||||
rm -rf /var/cache/apk/* \
|
||||
/root/*
|
||||
/opt/glutton/payloads
|
||||
#
|
||||
# Start glutton
|
||||
WORKDIR /opt/glutton
|
||||
USER glutton:glutton
|
||||
USER 2000:2000
|
||||
CMD exec bin/server -d true -i $(/sbin/ip address show | /usr/bin/awk '/inet.*brd/{ print $NF; exit }') -l /var/log/glutton/glutton.log > /dev/null 2>&1
|
||||
|
Reference in New Issue
Block a user