tpotce/docker/redishoneypot/Dockerfile

34 lines
773 B
Text
Raw Normal View History

FROM golang:1.23-alpine as builder
2021-07-05 19:59:44 +00:00
#
# Include dist
2022-03-08 23:36:03 +00:00
COPY dist/ /root/dist/
2021-07-05 19:59:44 +00:00
#
2024-09-11 10:42:17 +00:00
# Install packages
RUN apk --no-cache -U add \
build-base \
git \
go \
g++ && \
2021-07-05 19:59:44 +00:00
#
2024-09-11 10:42:17 +00:00
# Setup go, redishoneypot
2021-07-05 19:59:44 +00:00
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
#
FROM alpine:3.20
#
# Setup redishoneypot
#
COPY --from=builder /opt/go/bin/RedisHoneyPot /opt/redishoneypot/
COPY --from=builder /root/dist/redis.conf /opt/redishoneypot/
2021-07-05 19:59:44 +00:00
#
# Start redishoneypot
WORKDIR /opt/redishoneypot
USER 2000:2000
2021-07-05 19:59:44 +00:00
CMD ./RedisHoneyPot > /var/log/redishoneypot/redishoneypot.log 2>&1