mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
tweaking
multi stage build for dicompot rebuild fatt, glutton, hellpot, honeypots for alpine 3.19 bump glutton, hellpot, honeypots to latest master
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
FROM alpine:3.19
|
||||
FROM golang:1.21-alpine as builder
|
||||
#
|
||||
# Include dist
|
||||
COPY dist/ /root/dist/
|
||||
@ -8,7 +8,6 @@ RUN apk -U add --no-cache \
|
||||
build-base \
|
||||
git \
|
||||
g++ && \
|
||||
apk -U add --no-cache go --repository http://dl-3.alpinelinux.org/alpine/edge/community && \
|
||||
#
|
||||
# Setup go, build dicompot
|
||||
mkdir -p /opt/go && \
|
||||
@ -18,26 +17,20 @@ RUN apk -U add --no-cache \
|
||||
cd dicompot && \
|
||||
git checkout 41331194156bbb17078bcc1594f4952ac06a731e && \
|
||||
go mod download && \
|
||||
go install -a -x github.com/nsmfoo/dicompot/server && \
|
||||
go install -a -x github.com/nsmfoo/dicompot/server
|
||||
#
|
||||
FROM alpine:3.19
|
||||
#
|
||||
# Setup dicompot
|
||||
mkdir -p /opt/dicompot/images && \
|
||||
cp /opt/go/bin/server /opt/dicompot && \
|
||||
cp -R /root/dist/dcm_pts/P1/ /opt/dicompot/images && \
|
||||
#
|
||||
COPY --from=builder /opt/go/bin/server /opt/dicompot/server
|
||||
COPY --from=builder /root/dist/dcm_pts/images /opt/dicompot/images
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 dicompot && \
|
||||
adduser -S -s /bin/ash -u 2000 -D -g 2000 dicompot && \
|
||||
chown -R dicompot:dicompot /opt/dicompot && \
|
||||
#
|
||||
# Clean up
|
||||
apk del --purge build-base \
|
||||
git \
|
||||
go \
|
||||
g++ && \
|
||||
rm -rf /var/cache/apk/* \
|
||||
/opt/go \
|
||||
/root/dist
|
||||
RUN addgroup -g 2000 dicompot && \
|
||||
adduser -S -s /bin/ash -u 2000 -D -g 2000 dicompot && \
|
||||
chown -R dicompot:dicompot /opt/dicompot
|
||||
#
|
||||
# Start dicompot
|
||||
WORKDIR /opt/dicompot
|
||||
|
Reference in New Issue
Block a user