summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: f7d5bc9cb9e38e4719e66bfb79754d7979e29942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:alpine as build
WORKDIR /app

# install build dependencies
RUN apk add --no-cache build-base git && \
    apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yara-dev

# copy and build PMF
COPY . .
RUN make

FROM golang:alpine
LABEL org.opencontainers.image.source="https://github.com/jvoisin/php-malware-finder"
WORKDIR /app

# install dependencies
RUN apk add --no-cache libressl

# copy files from build container
COPY --from=build /usr/local/lib /usr/lib
COPY --from=build /app/php-malware-finder /app

ENTRYPOINT ["/app/php-malware-finder", "-v", "-a", "-c", "/data"]