yarascanner/Dockerfile

20 lines
585 B
Docker
Raw Normal View History

2021-02-25 02:46:02 +00:00
FROM golang:alpine AS builder
2021-02-25 02:50:12 +00:00
RUN mkdir -p /build/src
2021-02-25 02:49:20 +00:00
2021-02-25 03:00:39 +00:00
ADD https://github.com/VirusTotal/yara/archive/v4.0.4.tar.gz /build/yara-4.0.4.tar.gz
2021-02-25 02:49:20 +00:00
2021-02-25 02:57:40 +00:00
RUN apk add --no-cache autoconf automake libtool make gcc g++ openssl-dev pkgconfig
2021-02-25 03:00:39 +00:00
RUN cd /build; tar xvf yara-4.0.4.tar.gz; cd yara-4.0.4; ./bootstrap.sh; ./configure; make; make install
2021-02-25 02:46:02 +00:00
ADD . /build/src
RUN cd /build/src \
&& go build -o /build/yarascanner
FROM alpine:3
COPY --from=builder /build/yarascanner /usr/bin/yarascanner
2021-03-07 04:43:07 +00:00
COPY --from=builder /usr/local/lib/libyara.so.4 /usr/local/lib/libyara.so.4
2021-02-25 02:46:02 +00:00
CMD "/usr/bin/yarascanner"