use gitea actions
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Has been cancelled
Some checks failed
Build Multiarch Container Image / call-reusable-workflow (push) Has been cancelled
This commit is contained in:
parent
75c5a47449
commit
92f7a489fb
3 changed files with 15 additions and 17 deletions
|
@ -1,26 +1,23 @@
|
|||
FROM docker.io/rust:1-alpine3.18 AS builder
|
||||
|
||||
ARG ARCH=x86_64
|
||||
|
||||
RUN apk --no-cache add musl-dev
|
||||
|
||||
ENV CARGO_CARGO_NEW_VCS="none"
|
||||
ENV CARGO_BUILD_RUSTFLAGS="-C target-feature=+crt-static"
|
||||
ENV CARGO_BUILD_TARGET="$ARCH-unknown-linux-musl"
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
RUN cargo init
|
||||
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
RUN cargo build --release
|
||||
RUN cargo build --release --target=$(arch)-unknown-linux-musl
|
||||
|
||||
COPY . .
|
||||
|
||||
# ensure rebuilding of the app
|
||||
RUN touch src/main.rs
|
||||
RUN cargo build --release
|
||||
RUN cp "./target/$CARGO_BUILD_TARGET/release/findpenguins-feed" /app
|
||||
RUN cargo build --release --target=$(arch)-unknown-linux-musl
|
||||
RUN cp "./target/$(arch)-unknown-linux-musl/release/findpenguins-feed" /app
|
||||
|
||||
|
||||
FROM scratch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue