mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Tweaking
- Ciscoasa, update py package - Cowrie, remove build artifact - Dicompot, harden image - Dionaea, hardening, update for py3.12
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
FROM golang:1.21-alpine AS builder
|
||||
FROM golang:1.23-alpine AS builder
|
||||
#
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLED=0 \
|
||||
GOOS=linux
|
||||
#
|
||||
# Include dist
|
||||
COPY dist/ /root/dist/
|
||||
@ -7,32 +11,25 @@ COPY dist/ /root/dist/
|
||||
RUN apk --no-cache -U add \
|
||||
build-base \
|
||||
git \
|
||||
g++ && \
|
||||
g++
|
||||
#
|
||||
# Setup go, build dicompot
|
||||
mkdir -p /opt/go && \
|
||||
export GOPATH=/opt/go/ && \
|
||||
cd /opt/go/ && \
|
||||
git clone https://github.com/nsmfoo/dicompot.git && \
|
||||
RUN git clone https://github.com/nsmfoo/dicompot.git && \
|
||||
cd dicompot && \
|
||||
git checkout 41331194156bbb17078bcc1594f4952ac06a731e && \
|
||||
go mod download && \
|
||||
go install -a -x github.com/nsmfoo/dicompot/server
|
||||
cp /root/dist/go.mod . && \
|
||||
pwd && ls -alR
|
||||
WORKDIR /go/dicompot
|
||||
RUN ls -alR
|
||||
RUN go mod tidy
|
||||
RUN go mod download
|
||||
RUN go build -o dicompot github.com/nsmfoo/dicompot/server
|
||||
#
|
||||
FROM alpine:3.19
|
||||
FROM scratch
|
||||
#
|
||||
# Setup dicompot
|
||||
#
|
||||
COPY --from=builder /opt/go/bin/server /opt/dicompot/server
|
||||
COPY --from=builder /go/dicompot/dicompot /opt/dicompot/dicompot
|
||||
COPY --from=builder /root/dist/dcm_pts/images /opt/dicompot/images
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
#
|
||||
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
|
||||
USER dicompot:dicompot
|
||||
CMD ["./server","-ip","0.0.0.0","-dir","images","-log","/var/log/dicompot/dicompot.log"]
|
||||
USER 2000:2000
|
||||
CMD ["-ip","0.0.0.0","-dir","images","-log","/var/log/dicompot/dicompot.log"]
|
||||
ENTRYPOINT ["./dicompot"]
|
||||
|
25
docker/dicompot/dist/go.mod
vendored
Normal file
25
docker/dicompot/dist/go.mod
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
module github.com/nsmfoo/dicompot
|
||||
|
||||
go 1.23
|
||||
|
||||
require (
|
||||
github.com/grailbio/go-dicom v0.0.0-20190117035129-c30d9eaca591
|
||||
github.com/mattn/go-colorable v0.1.6
|
||||
github.com/sirupsen/logrus v1.6.0
|
||||
github.com/snowzach/rotatefilehook v0.0.0-20180327172521-2f64f265f58c
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v0.3.1 // indirect
|
||||
github.com/gobwas/glob v0.0.0-20170212200151-51eb1ee00b6d // indirect
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
|
||||
github.com/mattn/go-isatty v0.0.12 // indirect
|
||||
golang.org/x/sys v0.1.0 // indirect
|
||||
golang.org/x/text v0.3.8 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.3.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/nsmfoo/dicompot => ../dicompot
|
||||
|
||||
replace github.com/golang/lint => ../../golang/lint
|
@ -16,6 +16,7 @@ services:
|
||||
networks:
|
||||
- dicompot_local
|
||||
ports:
|
||||
- "104:11112"
|
||||
- "11112:11112"
|
||||
image: "dtagdevsec/dicompot:24.04"
|
||||
read_only: true
|
||||
|
Reference in New Issue
Block a user