cargo-tarpaulin 0.10.2

Cargo-Tarpaulin is a tool to determine code coverage achieved via tests
Documentation
FROM rustlang/rust:nightly

RUN apt-get update && \
    apt-get install -y cmake && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /opt/tarpaulin

RUN env USER=root cargo init .

COPY Cargo.toml .
COPY Cargo.lock .
RUN mkdir .cargo
RUN cargo vendor > .cargo/config

COPY . /opt/tarpaulin/

RUN cd /opt/tarpaulin/ && \
    cargo install --locked --path . && \
    rm -rf /opt/tarpaulin/ && \
    rm -rf /usr/local/cargo/registry/

WORKDIR /volume

CMD cargo build && cargo tarpaulin