summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile37
1 files changed, 37 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..e13b19d
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,37 @@
1FROM golang:alpine as build
2WORKDIR /app
3
4# install build dependencies
5RUN apk add --no-cache \
6 build-base \
7 automake \
8 autoconf \
9 pkgconfig \
10 libtool \
11 bison \
12 libressl-dev \
13 git
14
15# install YARA
16RUN git clone --depth 1 https://github.com/virustotal/yara.git \
17 && cd yara \
18 && sh ./build.sh \
19 && make install \
20 && cd ..
21
22# copy and build PMF
23COPY . .
24RUN make
25
26FROM golang:alpine
27LABEL org.opencontainers.image.source="https://github.com/jvoisin/php-malware-finder"
28WORKDIR /app
29
30# install dependencies
31RUN apk add --no-cache libressl
32
33# copy files from build container
34COPY --from=build /usr/local/lib /usr/lib
35COPY --from=build /app/php-malware-finder /app
36
37ENTRYPOINT ["/app/php-malware-finder", "-v", "-a", "-c", "/data"]