-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.local
37 lines (30 loc) · 943 Bytes
/
Dockerfile.local
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
FROM alpine:3.7
LABEL maintainer "[email protected]"
ARG app_name=hmbd
RUN set -x \
&& echo "===> Add malice user and malware folder..." \
&& addgroup malice \
&& adduser -S -G malice malice \
&& mkdir /malware
RUN apk --update add ca-certificates
RUN apk --update add --no-cache -t .build-deps \
tini \
su-exec \
&& echo "===> Building hmbd daemon..." \
&& apk del --purge .build-deps
## fix golang link
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
# Add hmb soft
ADD http://dl.shellpub.com/hmb/latest/hmb-linux-amd64.tgz /malware/hmb.tgz
COPY VERSION /malware/
COPY ${app_name} /malware/
RUN chmod +x /malware/${appname} \
&& tar xvf /malware/hmb.tgz -C /malware \
&& ln -s /malware/hmb /bin/hmb \
&& rm /malware/hmb.tgz
RUN chown -R malice:malice /malware
USER malice
WORKDIR /malware
ENTRYPOINT ["./hmbd"]
#ENTRYPOINT ["su-exec","malice","/sbin/tini","--","avscan"]
CMD ["--help"]