-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
44 lines (36 loc) · 1.44 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
43
44
####################################################
# GOLANG BUILDER
####################################################
FROM golang:1.11-alpine as go_builder
RUN apk add git mercurial
COPY . /go/src/github.com/malice-plugins/floss
WORKDIR /go/src/github.com/malice-plugins/floss
RUN go get -u github.com/golang/dep/cmd/dep && dep ensure
RUN go build -ldflags "-s -w -X main.Version=v$(cat VERSION) -X main.BuildTime=$(date -u +%Y%m%d)" -o /bin/flscan
####################################################
# PLUGIN BUILDER
####################################################
FROM malice/alpine
LABEL maintainer "https://github.com/blacktop"
LABEL malice.plugin.repository = "https://github.com/malice-plugins/floss.git"
LABEL malice.plugin.category="exe"
LABEL malice.plugin.mime="application/x-dosexec"
LABEL malice.plugin.docker.engine="*"
RUN apk --update add --no-cache python py-setuptools ca-certificates
RUN apk --update add --no-cache -t .build-deps \
python-dev \
build-base \
musl-dev \
openssl \
py-pip \
&& echo "===> Install FLOSS..." \
&& export PIP_NO_CACHE_DIR=off \
&& export PIP_DISABLE_PIP_VERSION_CHECK=on \
&& pip install https://github.com/williballenthin/vivisect/zipball/master \
&& pip install https://github.com/fireeye/flare-floss/zipball/master \
&& rm -rf /tmp/* \
&& apk del --purge .build-deps
COPY --from=go_builder /bin/flscan /bin/flscan
WORKDIR /malware
ENTRYPOINT ["su-exec","malice","flscan"]
CMD ["--help"]