-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (34 loc) · 1.28 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM malice/alpine
LABEL maintainer "https://github.com/chennqqi"
LABEL malice.plugin.repository = "https://github.com/chennqqi/hmbd.git"
LABEL malice.plugin.category="av"
LABEL malice.plugin.mime="*"
LABEL malice.plugin.docker.engine="*"
COPY . /go/src/github.com/chennqqi/hmbd
#RUN apk --update add --no-cache clamav ca-certificates
RUN apk --update add --no-cache ca-certificates
RUN apk --update add --no-cache -t .build-deps \
git \
go \
&& echo "Building hm webshell scanner deamon Go binary..." \
&& export GOPATH=/go \
&& mkdir -p /go/src/golang.org/x \
&& cd /go/src/golang.org/x \
&& git clone https://github.com/golang/net \
&& cd /go/src/github.com/chennqqi/hmbd \
&& go version \
&& go get \
&& go build -ldflags "-X main.Version=$(cat VERSION) -X main.BuildTime=$(date -u +%Y%m%d)" -o /bin/hmbd \
&& rm -rf /go /usr/local/go /usr/lib/go /tmp/* \
&& apk del --purge .build-deps
RUN chown malice -R /malware
WORKDIR /malware
# Add hmb soft
ADD http://dl.shellpub.com/hmb/latest/hmb-linux-amd64.tgz /malware/hmb.tgz
RUN tar xvf /malware/hmb.tgz -C /malware
RUN ln -s /malware/hmb /bin/hmb
# Update ClamAV Definitions
#RUN hmb update
ENTRYPOINT ["hmbd"]
#ENTRYPOINT ["su-exec","malice","/sbin/tini","--","avscan"]
CMD ["--help"]