# Dockerfile to test Linux behavior on macOS
FROM rust:1.74.0
RUN rustup component add clippy
RUN rustup component add rustfmt
RUN mkdir /async-icmp
WORKDIR /async-icmp
CMD scripts/ci-check.sh
# get dependencies downloaded & compiled
RUN mkdir src && touch src/lib.rs
ADD Cargo.toml Cargo.lock ./
# check so `cargo doc` has less work to do later.
# Don't build examples or tests now, as that doesn't get properly detected as dirty later.
RUN cargo build && cargo check
ADD . .