Containerfile.alpine: add temporary for checking rust bindgen builds

This commit is contained in:
Ryan Heywood 2024-03-06 14:36:22 -05:00
parent a151711d86
commit c199843a28
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 23 additions and 0 deletions

23
Containerfile.alpine Normal file
View File

@ -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