Simplify: Remove cargo-watch from Docker dev build

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.
This commit is contained in:
goose 2026-02-15 12:03:28 -03:00
parent ea6f29238c
commit 5e20e802f3
2 changed files with 11 additions and 29 deletions

View file

@ -1,11 +1,9 @@
FROM rust:1.83-alpine
WORKDIR /app
RUN apk add --no-cache musl-dev pkgconf openssl-dev curl wget git pkgconfig
# Pin cargo-watch to version 8.4.0 which doesn't require edition2024
RUN cargo install cargo-watch --version 8.4.0
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-watch", "-x", "run"]
CMD ["cargo", "run"]