cargo-watch dependencies require Rust 1.85+ and edition2024. For development, we can simply use 'cargo run' which works fine. The server can be restarted with docker compose restart.
9 lines
259 B
Text
9 lines
259 B
Text
FROM rust:1.83-alpine
|
|
WORKDIR /app
|
|
RUN apk add --no-cache musl-dev pkgconf openssl-dev curl wget git pkgconfig
|
|
COPY Cargo.toml ./
|
|
RUN mkdir src && echo 'fn main() {}' > src/main.rs
|
|
RUN cargo build && rm -rf src
|
|
COPY src ./src
|
|
EXPOSE 8000
|
|
CMD ["cargo", "run"]
|