mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 12:32:12 +00:00
add medpot
great work by @schmalle, thank you!
This commit is contained in:
parent
6869ceb548
commit
39fb972589
2 changed files with 66 additions and 0 deletions
46
docker/medpot/Dockerfile
Normal file
46
docker/medpot/Dockerfile
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
# Setup apk
|
||||||
|
RUN apk -U --no-cache add \
|
||||||
|
build-base \
|
||||||
|
git \
|
||||||
|
go \
|
||||||
|
g++ && \
|
||||||
|
|
||||||
|
# Setup go, build medpot
|
||||||
|
export GOPATH=/opt/go/ && \
|
||||||
|
mkdir -p /opt/go/src && \
|
||||||
|
cd /opt/go/src && \
|
||||||
|
git clone https://github.com/schmalle/medpot.git && \
|
||||||
|
go get -d -v github.com/davecgh/go-spew/spew && \
|
||||||
|
go get -d -v github.com/go-ini/ini && \
|
||||||
|
go get -d -v github.com/mozillazg/request && \
|
||||||
|
go get -d -v go.uber.org/zap && \
|
||||||
|
cd medpot && \
|
||||||
|
go build medpot && \
|
||||||
|
|
||||||
|
# Setup medpot
|
||||||
|
mkdir -p /opt/medpot \
|
||||||
|
/var/log/ && \
|
||||||
|
touch /var/log/medpot.log && \
|
||||||
|
cp medpot /opt/medpot && \
|
||||||
|
cp /opt/go/src/medpot/template/*.xml /opt/medpot/ && \
|
||||||
|
|
||||||
|
# Setup user, groups and configs
|
||||||
|
addgroup -g 2000 medpot && \
|
||||||
|
adduser -S -s /bin/ash -u 2000 -D -g 2000 medpot && \
|
||||||
|
chown -R medpot:medpot /var/log/medpot.log && \
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
apk del --purge build-base \
|
||||||
|
git \
|
||||||
|
go \
|
||||||
|
g++ && \
|
||||||
|
rm -rf /var/cache/apk/* \
|
||||||
|
/opt/go \
|
||||||
|
/root/dist
|
||||||
|
|
||||||
|
# Start medpot
|
||||||
|
WORKDIR /opt/medpot
|
||||||
|
USER medpot:medpot
|
||||||
|
CMD ["./medpot"]
|
20
docker/medpot/docker-compose.yml
Normal file
20
docker/medpot/docker-compose.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
version: '2.3'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
medpot_local:
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
# medpot service
|
||||||
|
medpot:
|
||||||
|
build: .
|
||||||
|
container_name: medpot
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- medpot_local
|
||||||
|
ports:
|
||||||
|
- "2575:2575"
|
||||||
|
image: "dtagdevsec/medpot:1804"
|
||||||
|
read_only: true
|
||||||
|
volumes:
|
||||||
|
- /data/medpot/log/:/var/log/
|
Loading…
Reference in a new issue