From 212e3abb86825d3fe17d9396de35fa7bb80eccd1 Mon Sep 17 00:00:00 2001 From: thek4n Date: Wed, 3 Jun 2026 14:36:07 +0300 Subject: [PATCH] ci(fix): dockerfile --- Cargo.toml | 1 - Dockerfile | 11 ++++++----- rust-toolchain.toml | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7b57647..d9676d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,6 @@ [package] name = "thek4n-ru" version = "0.1.0" -edition = "2024" authors = ["Vladislav Kan "] license = "MIT" diff --git a/Dockerfile b/Dockerfile index 4204cc8..a9992a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,9 +20,10 @@ FROM chef AS builder COPY --from=chef /app/recipe.json /app/recipe.json RUN cargo chef cook --target x86_64-unknown-linux-musl --release --recipe-path /app/recipe.json -## Если есть rust-toolchain.toml -# COPY rust-toolchain.toml rust-toolchain.toml -# RUN cargo fetch +# rust-toolchain должен содержать +## targets = ["x86_64-unknown-linux-musl"] +COPY rust-toolchain.toml* ./ +RUN cargo fetch COPY . . RUN cargo build --target x86_64-unknown-linux-musl --release @@ -31,6 +32,6 @@ RUN cargo build --target x86_64-unknown-linux-musl --release # Runtime FROM scratch -COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/example /usr/local/bin/example +COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/thek4n-ru /usr/local/bin/thek4n-ru -CMD ["/usr/local/bin/example"] +CMD ["/usr/local/bin/thek4n-ru"] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d0ead5e..8864504 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,4 @@ [toolchain] channel = "stable" components = ["clippy", "rustfmt"] +targets = ["x86_64-unknown-linux-musl"]