diff options
Diffstat (limited to '')
| -rw-r--r-- | Dockerfile | 37 |
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 @@ | |||
| 1 | FROM golang:alpine as build | ||
| 2 | WORKDIR /app | ||
| 3 | |||
| 4 | # install build dependencies | ||
| 5 | RUN 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 | ||
| 16 | RUN 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 | ||
| 23 | COPY . . | ||
| 24 | RUN make | ||
| 25 | |||
| 26 | FROM golang:alpine | ||
| 27 | LABEL org.opencontainers.image.source="https://github.com/jvoisin/php-malware-finder" | ||
| 28 | WORKDIR /app | ||
| 29 | |||
| 30 | # install dependencies | ||
| 31 | RUN apk add --no-cache libressl | ||
| 32 | |||
| 33 | # copy files from build container | ||
| 34 | COPY --from=build /usr/local/lib /usr/lib | ||
| 35 | COPY --from=build /app/php-malware-finder /app | ||
| 36 | |||
| 37 | ENTRYPOINT ["/app/php-malware-finder", "-v", "-a", "-c", "/data"] | ||
