Use yara from apk
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tyler 2021-10-04 22:17:26 -04:00
parent a33183fa1d
commit 636fb3cff9
1 changed files with 2 additions and 4 deletions

View File

@ -2,10 +2,8 @@ FROM golang:alpine AS builder
RUN mkdir -p /build/src 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 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 RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yara
ADD . /build/src ADD . /build/src
@ -14,7 +12,7 @@ RUN cd /build/src \
FROM alpine:3 FROM alpine:3
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yara
COPY --from=builder /build/yarascanner /usr/bin/yarascanner 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" CMD "/usr/bin/yarascanner"