mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
prep for redishoneypot
This commit is contained in:
43
docker/redishoneypot/Dockerfile
Normal file
43
docker/redishoneypot/Dockerfile
Normal file
@ -0,0 +1,43 @@
|
||||
FROM alpine:3.14
|
||||
#
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
#
|
||||
# Setup apk
|
||||
RUN apk -U --no-cache add \
|
||||
build-base \
|
||||
git \
|
||||
go \
|
||||
g++ && \
|
||||
#
|
||||
# Setup go, hellpot
|
||||
cd /root && \
|
||||
export GOPATH=/opt/go/ && \
|
||||
mkdir -p /opt/go && \
|
||||
git clone https://github.com/cypwnpwnsocute/RedisHoneyPot && \
|
||||
cd RedisHoneyPot && \
|
||||
git checkout 45adc622a423d12d76392c3a54274f6cff111d58 && \
|
||||
go mod download && \
|
||||
go install && \
|
||||
mkdir -p /opt/redishoneypot && \
|
||||
mv /opt/go/bin/RedisHoneyPot /opt/redishoneypot/ && \
|
||||
mv /root/dist/redis.conf /opt/redishoneypot && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 redishoneypot && \
|
||||
adduser -S -s /bin/ash -u 2000 -D -g 2000 redishoneypot && \
|
||||
mkdir -p /var/log/redishoneypot && \
|
||||
#
|
||||
# Clean up
|
||||
apk del --purge build-base \
|
||||
git \
|
||||
go \
|
||||
g++ && \
|
||||
rm -rf /var/cache/apk/* \
|
||||
/opt/go \
|
||||
/root/dist
|
||||
#
|
||||
# Start redishoneypot
|
||||
WORKDIR /opt/redishoneypot
|
||||
USER redishoneypot:redishoneypot
|
||||
CMD ./RedisHoneyPot > /var/log/redishoneypot/redishoneypot.log 2>&1
|
Reference in New Issue
Block a user