yarascanner/Dockerfile

19 lines
539 B
Docker

FROM golang:alpine AS builder
RUN mkdir -p /build/src
RUN apk add --no-cache autoconf automake libtool make gcc g++ openssl-dev pkgconfig
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing yara yara-dev
ADD . /build/src
RUN export PKG_CONFIG_PATH=/usr/lib/pkgconfig && \
cd /build/src \
&& go build -o /build/yarascanner
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
CMD "/usr/bin/yarascanner"