ci(fix): dockerfile
This commit is contained in:
parent
070953f477
commit
212e3abb86
@ -1,7 +1,6 @@
|
||||
[package]
|
||||
name = "thek4n-ru"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
authors = ["Vladislav Kan <thek4n@yandex.ru>"]
|
||||
license = "MIT"
|
||||
|
||||
|
||||
11
Dockerfile
11
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"]
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
[toolchain]
|
||||
channel = "stable"
|
||||
components = ["clippy", "rustfmt"]
|
||||
targets = ["x86_64-unknown-linux-musl"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user