mirror of
https://github.com/SinTan1729/chhoto-url
synced 2024-12-26 23:58:35 -06:00
Compare commits
No commits in common. "0d0da1141b32370227b52bcf89c5d54087b5cd4f" and "5213a9df2eb4570c415314c14b4959d173f4cb4a" have entirely different histories.
0d0da1141b
...
5213a9df2e
2 changed files with 8 additions and 9 deletions
11
Dockerfile
11
Dockerfile
|
@ -4,12 +4,12 @@
|
|||
FROM lukemathwalker/cargo-chef:latest-rust-slim AS chef
|
||||
WORKDIR /chhoto-url
|
||||
|
||||
FROM chef AS planner
|
||||
COPY ./actix/Cargo.toml ./actix/Cargo.lock ./
|
||||
FROM chef as planner
|
||||
COPY ./actix/Cargo.toml ./actix/Cargo.lock .
|
||||
COPY ./actix/src ./src
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM chef AS builder
|
||||
FROM chef as builder
|
||||
ARG target=x86_64-unknown-linux-musl
|
||||
RUN apt-get update && apt-get install -y musl-tools
|
||||
RUN rustup target add $target
|
||||
|
@ -18,13 +18,12 @@ COPY --from=planner /chhoto-url/recipe.json recipe.json
|
|||
# Build dependencies - this is the caching Docker layer
|
||||
RUN cargo chef cook --release --target=$target --recipe-path recipe.json
|
||||
|
||||
COPY ./actix/Cargo.toml ./actix/Cargo.lock ./
|
||||
COPY ./actix/Cargo.toml ./actix/Cargo.lock .
|
||||
COPY ./actix/src ./src
|
||||
# Build application
|
||||
RUN cargo build --release --target=$target --locked --bin chhoto-url
|
||||
RUN cp /chhoto-url/target/$target/release/chhoto-url /chhoto-url/release
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /chhoto-url/release /chhoto-url
|
||||
COPY --from=builder /chhoto-url/target/$target/release/chhoto-url /chhoto-url
|
||||
COPY ./resources /resources
|
||||
ENTRYPOINT ["/chhoto-url"]
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# SPDX-FileCopyrightText: 2023 Sayantan Santra <sayantan.santra689@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
FROM scratch AS builder-amd64
|
||||
FROM scratch as builder-amd64
|
||||
COPY ./actix/target/x86_64-unknown-linux-musl/release/chhoto-url /chhoto-url
|
||||
|
||||
FROM scratch AS builder-arm64
|
||||
FROM scratch as builder-arm64
|
||||
COPY ./actix/target/aarch64-unknown-linux-musl/release/chhoto-url /chhoto-url
|
||||
|
||||
FROM scratch AS builder-arm
|
||||
FROM scratch as builder-arm
|
||||
COPY ./actix/target/armv7-unknown-linux-musleabihf/release/chhoto-url /chhoto-url
|
||||
|
||||
ARG TARGETARCH
|
||||
|
|
Loading…
Reference in a new issue