Changes: - Updated Rust from 1.75 to 1.83 in both Dockerfiles - Fixed CMD syntax: changed single quotes to double quotes (JSON format) Before: CMD ['cargo-watch', '-x', 'run'] After: CMD [cargo-watch, -x, run] This fixes the cargo-watch compilation error that required edition2024. Rust 1.83 supports all current crate features and editions.
10 lines
301 B
Text
10 lines
301 B
Text
FROM rust:1.83-alpine
|
|
WORKDIR /app
|
|
RUN apk add --no-cache musl-dev pkgconf openssl-dev curl wget git pkgconfig
|
|
RUN cargo install cargo-watch
|
|
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"]
|