mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-05-11 02:46:04 +00:00
bump hellpot to latest master, hardening
This commit is contained in:
parent
adefcca2fc
commit
25d98cbce9
1 changed files with 4 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.21-alpine AS builder
|
||||
FROM golang:1.23-alpine AS builder
|
||||
#
|
||||
# Include dist
|
||||
COPY dist/ /root/dist/
|
||||
|
@ -13,8 +13,7 @@ RUN apk --no-cache -U add \
|
|||
cd /root && \
|
||||
git clone https://github.com/yunginnanet/HellPot && \
|
||||
cd HellPot && \
|
||||
git checkout 3673ab0228664fb3acd33102be5c7a5867137eb5 && \
|
||||
# git checkout 49433bf499b6af314786cbbc3cb8566cdb18c40c && \
|
||||
git checkout c48b70110148918255f93df4fa49c675ba5a5754 && \
|
||||
sed -i 's#logFileName := "HellPot"#logFileName := "hellpot"#g' internal/config/logger.go && \
|
||||
go mod download && \
|
||||
go vet -v ./... && \
|
||||
|
@ -25,17 +24,12 @@ RUN apk --no-cache -U add \
|
|||
-ldflags "-s -w -X main.version=$VERSION" \
|
||||
cmd/HellPot/HellPot.go
|
||||
#
|
||||
FROM alpine:3.19
|
||||
FROM scratch
|
||||
#
|
||||
COPY --from=builder /root/HellPot/HellPot /opt/hellpot/
|
||||
COPY --from=builder /root/dist/config.toml /opt/hellpot/config/
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
RUN addgroup -g 2000 hellpot && \
|
||||
adduser -S -s /bin/ash -u 2000 -D -g 2000 hellpot && \
|
||||
mkdir -p /var/log/hellpot
|
||||
#
|
||||
# Start hellpot
|
||||
WORKDIR /opt/hellpot
|
||||
USER hellpot:hellpot
|
||||
USER 2000:2000
|
||||
CMD ["./HellPot", "-c","config/config.toml"]
|
||||
|
|
Loading…
Reference in a new issue