release build
This commit is contained in:
parent
1f8a81e731
commit
03e4e670a9
@ -19,3 +19,9 @@ parse_duration = "2.1.1"
|
||||
serde = "1.0.210"
|
||||
tokio = {version = "1.40.0", features = ["full"]}
|
||||
tokio-macros = "2.4.0"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
debug = false
|
||||
lto = true
|
||||
strip = true
|
||||
|
@ -7,11 +7,11 @@ RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM chef AS builder
|
||||
COPY --from=planner /app/recipe.json recipe.json
|
||||
RUN cargo chef cook --recipe-path recipe.json
|
||||
RUN cargo chef cook --release --recipe-path recipe.json
|
||||
COPY . .
|
||||
RUN cargo build
|
||||
RUN cargo build --release
|
||||
|
||||
FROM debian:12-slim AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/target/debug/doctor-restart /usr/local/bin
|
||||
COPY --from=builder /app/target/release/doctor-restart /usr/local/bin
|
||||
ENTRYPOINT ["/usr/local/bin/doctor-restart"]
|
Loading…
Reference in New Issue
Block a user