yarascanner/Dockerfile
Tyler a33183fa1d
Some checks failed
continuous-integration/drone/push Build is failing
Update yara to 4.1.2
2021-10-04 21:40:03 -04:00

20 lines
585 B
Docker

FROM golang:alpine AS builder
RUN mkdir -p /build/src
ADD https://github.com/VirusTotal/yara/archive/v4.1.2.tar.gz /build/yara-4.1.2.tar.gz
RUN apk add --no-cache autoconf automake libtool make gcc g++ openssl-dev pkgconfig
RUN cd /build; tar xvf yara-4.1.2.tar.gz; cd yara-4.1.2; ./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
COPY --from=builder /usr/local/lib/libyara.so.4 /usr/local/lib/libyara.so.4
CMD "/usr/bin/yarascanner"