Containerfile.alpine: add temporary for checking rust bindgen builds
This commit is contained in:
parent
a151711d86
commit
c199843a28
|
@ -0,0 +1,23 @@
|
||||||
|
FROM rust:1.76-alpine AS build
|
||||||
|
|
||||||
|
RUN apk add clang-dev nettle-dev linux-headers
|
||||||
|
ADD . /src
|
||||||
|
WORKDIR /src
|
||||||
|
ADD <<-EOF /.cargo/config.toml
|
||||||
|
[registries.distrust]
|
||||||
|
index = "https://git.distrust.co/public/_cargo-index.git"
|
||||||
|
EOF
|
||||||
|
RUN cargo fetch
|
||||||
|
ENV NETTLE_STATIC=yes
|
||||||
|
ENV PCSC_LIB_NAME=static=pcsclite
|
||||||
|
ENV RUSTFLAGS='-C codegen-units=1 -C target-features=+crt-static'
|
||||||
|
RUN --network=none \
|
||||||
|
cargo build \
|
||||||
|
--frozen \
|
||||||
|
--release \
|
||||||
|
--features link-static \
|
||||||
|
--target x86_64-alpine-linux-musl \
|
||||||
|
--bin keyfork
|
||||||
|
|
||||||
|
FROM scratch AS package
|
||||||
|
COPY --from=build keyfork/target/release/keyfork /keyfork
|
Loading…
Reference in New Issue