mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-05-11 02:46:04 +00:00
bump medpot to latest master
This commit is contained in:
parent
1eaec0036e
commit
421b3d3020
2 changed files with 13 additions and 62 deletions
docker/medpot
|
@ -8,27 +8,29 @@ RUN apk -U --no-cache add \
|
|||
g++ && \
|
||||
#
|
||||
# Setup go, build medpot
|
||||
export GOPATH=/opt/go/ && \
|
||||
export GOPATH=/tmp && \
|
||||
export GO111MODULE=off && \
|
||||
mkdir -p /opt/go/src && \
|
||||
cd /opt/go/src && \
|
||||
git clone https://github.com/schmalle/medpot && \
|
||||
cd medpot && \
|
||||
git checkout 75a2e6134cf926c35b6017d62542274434c87388 && \
|
||||
cd .. && \
|
||||
cd /tmp && \
|
||||
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 && \
|
||||
go get -d -v github.com/s9rA16Bf4/ArgumentParser/go/arguments && \
|
||||
go get -d -v github.com/s9rA16Bf4/notify_handler/go/notify && \
|
||||
# git clone https://github.com/schmalle/medpot && \
|
||||
git clone https://github.com/s9rA16Bf4/medpot && \
|
||||
cd medpot && \
|
||||
cp dist/etc/ews.cfg /etc/ && \
|
||||
go build medpot && \
|
||||
# git checkout 75a2e6134cf926c35b6017d62542274434c87388 && \
|
||||
git checkout dd9833786bb56cd40c11dfb15e0dd57298e249e8 && \
|
||||
sed -i s/"ews = true"/"ews = false"/g template/ews.cfg && \
|
||||
go build -o medpot go/medpot.go go/logo.go && \
|
||||
#
|
||||
# Setup medpot
|
||||
mkdir -p /opt/medpot \
|
||||
mkdir -p /etc/medpot \
|
||||
/opt/medpot \
|
||||
/var/log/medpot && \
|
||||
cp medpot /opt/medpot && \
|
||||
cp /opt/go/src/medpot/template/*.xml /opt/medpot/ && \
|
||||
cp ./template/* /etc/medpot && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 medpot && \
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
FROM alpine:3.16
|
||||
#
|
||||
# Setup apk
|
||||
RUN apk -U --no-cache add \
|
||||
build-base \
|
||||
git \
|
||||
go \
|
||||
g++ && \
|
||||
#
|
||||
# Setup go, build medpot
|
||||
export GOPATH=/tmp && \
|
||||
export GO111MODULE=off && \
|
||||
cd /tmp && \
|
||||
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 && \
|
||||
go get -d -v github.com/s9rA16Bf4/ArgumentParser/go/arguments && \
|
||||
go get -d -v github.com/s9rA16Bf4/notify_handler/go/notify && \
|
||||
git clone https://github.com/schmalle/medpot && \
|
||||
cd medpot && \
|
||||
# git checkout 75a2e6134cf926c35b6017d62542274434c87388 && \
|
||||
git checkout 3ec8740258d85ab3558659c727226d752ecaa43f && \
|
||||
sed -i s/"ews = true"/"ews = false"/g template/ews.cfg && \
|
||||
go build -o medpot go/medpot.go go/logo.go && \
|
||||
#
|
||||
# Setup medpot
|
||||
mkdir -p /etc/medpot \
|
||||
/opt/medpot \
|
||||
/var/log/medpot && \
|
||||
cp medpot /opt/medpot && \
|
||||
cp ./template/* /etc/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 && \
|
||||
#
|
||||
# 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"]
|
Loading…
Reference in a new issue