mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
begin integration of dicompot
This commit is contained in:
42
docker/dicompot/Dockerfile
Normal file
42
docker/dicompot/Dockerfile
Normal file
@ -0,0 +1,42 @@
|
||||
FROM alpine:latest
|
||||
#
|
||||
# Setup apk
|
||||
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||
apk -U add \
|
||||
build-base \
|
||||
git \
|
||||
g++ && \
|
||||
apk -U add go --repository http://dl-3.alpinelinux.org/alpine/edge/community && \
|
||||
#
|
||||
# Setup go, build dicompot
|
||||
mkdir -p /opt/go && \
|
||||
export GOPATH=/opt/go/ && \
|
||||
cd /opt/go/ && \
|
||||
git clone https://github.com/nsmfoo/dicompot.git && \
|
||||
cd dicompot && \
|
||||
sed -i 's#dicompot.log#/var/log/dicompot/dicompot.log#g' server/server.go && \
|
||||
go mod download && \
|
||||
go install -a -x github.com/nsmfoo/dicompot/server && \
|
||||
#
|
||||
# Setup dicompot
|
||||
mkdir -p /opt/dicompot && \
|
||||
cp /opt/go/bin/server /opt/dicompot && \
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# Start dicompot
|
||||
WORKDIR /opt/dicompot
|
||||
USER dicompot:dicompot
|
||||
CMD ["./server","-ip","0.0.0.0"]
|
20
docker/dicompot/docker-compose.yml
Normal file
20
docker/dicompot/docker-compose.yml
Normal file
@ -0,0 +1,20 @@
|
||||
version: '2.3'
|
||||
|
||||
networks:
|
||||
dicompot_local:
|
||||
|
||||
services:
|
||||
|
||||
# dicompot service
|
||||
dicompot:
|
||||
build: .
|
||||
container_name: dicompot
|
||||
restart: always
|
||||
networks:
|
||||
- dicompot_local
|
||||
ports:
|
||||
- "11112:11112"
|
||||
image: "dtagdevsec/dicompot:2006"
|
||||
read_only: true
|
||||
volumes:
|
||||
- /data/dicompot/log:/var/log/dicompot
|
@ -32,6 +32,11 @@ services:
|
||||
build: cowrie/.
|
||||
image: "dtagdevsec/cowrie:2006"
|
||||
|
||||
# Dicompot service
|
||||
dicompot:
|
||||
build: dicompot/.
|
||||
image: "dtagdevsec/dicompot:2006"
|
||||
|
||||
# Dionaea service
|
||||
dionaea:
|
||||
build: dionaea/.
|
||||
|
Reference in New Issue
Block a user