# Override with --build-arg dist=ubuntu --build-arg flavor=bionic
ARG dist=debian
ARG flavor=sid

FROM ${dist}:${flavor} as builder


RUN apt-get update
RUN apt-get install -y --no-install-recommends autoconf make gcc \
                     automake autotools-dev \
                     ocaml-nox camlidl coccinelle \
                     libocamlnet-ocaml-dev libocamlnet-ocaml-bin \
                     libocamlnet-ssl-ocaml libocamlnet-ssl-ocaml-dev \
                     libssl-dev gnutls-dev \
                     libconfig-file-ocaml-dev camlp4

FROM builder
COPY . /build

WORKDIR /build

RUN ./autogen.sh
RUN ./configure --with-idlgen --with-rpcgen --with-libnames=foo --with-ssl --with-ssl-clientfiles='env'
RUN make