FROM golang:alpine

COPY . /src

WORKDIR /src

RUN apk add build-base libpcap-dev
RUN make compile

FROM alpine:latest

RUN apk update && apk add libpcap
COPY --from=0 /src/munchclient /usr/bin/

CMD /usr/bin/munchclient -config /etc/munchclient/munchclient.toml

