yarascanner/Dockerfile

19 lines
449 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
ADD https://github.com/VirusTotal/yara/archive/v4.0.5.tar.gz /build/yara/src.tar.gz
RUN apk add --no-cache automake libtool make gcc
2021-02-25 02:50:12 +00:00
RUN cd /build; tar xvf src.tar.gz; cd yara-4.0.5; ./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
CMD "/usr/bin/yarascanner"