29 lines
889 B
Docker
29 lines
889 B
Docker
FROM rust:1.88.0-alpine3.20
|
|
|
|
RUN apk add --no-cache \
|
|
build-base \
|
|
binutils \
|
|
file \
|
|
musl-dev \
|
|
openssl-dev \
|
|
openssl-libs-static \
|
|
perl \
|
|
pkgconf \
|
|
linux-headers \
|
|
&& rustup target add x86_64-unknown-linux-musl
|
|
|
|
ENV CARGO_NET_OFFLINE=false \
|
|
RUSTFLAGS=-Ctarget-cpu=x86-64
|
|
|
|
WORKDIR /workspace/signer
|
|
|
|
COPY nostr_core_lib_rust /workspace/nostr_core_lib_rust
|
|
COPY signer /workspace/signer
|
|
|
|
RUN cargo build --release --target x86_64-unknown-linux-musl
|
|
RUN file target/x86_64-unknown-linux-musl/release/signer \
|
|
&& file target/x86_64-unknown-linux-musl/release/signer-client \
|
|
&& ! readelf -l target/x86_64-unknown-linux-musl/release/signer | grep -q 'INTERP'
|
|
|
|
CMD ["sh", "-c", "mkdir -p /out && cp target/x86_64-unknown-linux-musl/release/signer /out/signer && cp target/x86_64-unknown-linux-musl/release/signer-client /out/signer_client"]
|