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:
parent
ea6f29238c
commit
5e20e802f3
2 changed files with 11 additions and 29 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue