yarascanner/Dockerfile

19 lines
493 B
Docker

FROM golang:alpine AS builder
RUN mkdir -p /build/src
ADD https://github.com/VirusTotal/yara/archive/v4.0.5.tar.gz /build/yara-4.0.5.tar.gz
RUN apk add --no-cache automake libtool make gcc openssl pkg-config
RUN cd /build; tar xvf yara-4.0.5.tar.gz; cd yara-4.0.5; ./bootstrap.sh; ./configure; make; make install
ADD . /build/src
RUN cd /build/src \
&& go build -o /build/yarascanner
FROM alpine:3
COPY --from=builder /build/yarascanner /usr/bin/yarascanner
CMD "/usr/bin/yarascanner"