This repository has been archived on 2024-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
stagex/tests/rust/Dockerfile

19 lines
502 B
Docker
Raw Normal View History

2023-11-01 21:55:00 +00:00
ARG LIBSTD_IMAGE=ocirep:rust-libstd-musl
ARG LIBMUSL_IMAGE=ocirep:libmusl
ARG LIBPCSCLITE_IMAGE=ocirep:libpcsclite-static
FROM ocirep:rust as build
COPY --from=${LIBSTD_IMAGE} . lib
COPY --from=${LIBMUSL_IMAGE} . lib
COPY --from=${LIBPCSCLITE_IMAGE} . lib
COPY . .
ENV PCSC_LIB_DIR='./lib'
ENV PCSC_LIB_NAME='static=pcsclite'
ENV RUSTFLAGS='-L lib -C target-feature=+crt-static'
RUN cargo build --target x86_64-unknown-linux-musl --release
2023-11-01 23:55:53 +00:00
FROM scratch
2023-11-01 21:55:00 +00:00
COPY --from=build target/release/pcsc_demo .