-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.private
39 lines (33 loc) · 1.02 KB
/
Dockerfile.private
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
FROM frolvlad/alpine-glibc
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
# Add hmb && phpdecoder soft
ENV HMB_DECODER_PHP /malware/php
COPY php64.tgz /malware/
ADD http://dl.shellpub.com/hmb/latest/hmb-linux-amd64.tgz /malware/hmb.tgz
#COPY hmb /malware
COPY ${app_name} /malware/
RUN chmod +x /malware/${app_name} \
&& tar xvf /malware/php64.tgz -C /malware \
&& tar xvf /malware/hmb.tgz -C /malware \
&& rm -f /malware/php64.tgz \
&& ln -s /malware/hmb /bin/hmb \
&& rm -f /malware/hmb.tgz \
&& rm -f /malware/hmb-linux-amd64.tgz
RUN chown -R malice:malice /malware
USER malice
WORKDIR /malware
ENTRYPOINT ["./hmbd"]
#ENTRYPOINT ["su-exec","malice","/sbin/tini","--","avscan"]
CMD ["--help"]