summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMathieu Deous2022-05-02 20:18:23 +0200
committerGitHub2022-05-02 20:18:23 +0200
commit48936efa96ae17295be4e0a71be3294f0ec6aef8 (patch)
treef4e69551f1368aa048edf46b7b061600f3668329 /Dockerfile
parentbbc738e16f8b637afde58d65196374af98a5e0e2 (diff)
Make application go-install-able and create a docker image
Diffstat (limited to '')
-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"]