automation_rs/Dockerfile
Dreaded_X 917deb717f
All checks were successful
continuous-integration/drone/push Build is passing
Added Dockerfile and drone config to auto build and deploy new versions
2023-01-17 17:41:47 +01:00

21 lines
678 B
Docker

FROM rustlang/rust:nightly-slim AS build
RUN cargo new --bin /app
RUN cargo new --lib /app/impl_cast
RUN cargo new --lib /app/google-home
COPY impl_cast/Cargo.toml /app/impl_cast
COPY google-home/Cargo.toml /app/google-home
COPY Cargo.toml Cargo.lock /app/
WORKDIR /app/
RUN --mount=type=cache,target=/usr/local/cargo/registry cargo build --release
COPY impl_cast/src/ /app/impl_cast/src/
COPY google-home/src/ /app/google-home/src/
COPY src/ /app/src/
RUN --mount=type=cache,target=/usr/local/cargo/registry set -e; touch /app/src/main.rs /app/src/lib.rs /app/google-home/src/lib.rs /app/impl_cast/src/lib.rs; cargo build --release
CMD ["/app/target/release/automation"]