mirror of
https://github.com/alexgo-io/stacks-subnets.git
synced 2026-01-12 22:43:44 +08:00
23 lines
740 B
Docker
23 lines
740 B
Docker
FROM rust:stretch as build
|
|
|
|
ARG SUBNET_NODE_VERSION="No Version Info"
|
|
ARG GIT_BRANCH='No Branch Info'
|
|
ARG GIT_COMMIT='No Commit Info'
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . .
|
|
|
|
RUN rustup target add armv7-unknown-linux-gnueabihf
|
|
|
|
RUN apt-get update && apt-get install -y git gcc-arm-linux-gnueabihf
|
|
|
|
RUN CC=arm-linux-gnueabihf-gcc \
|
|
CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \
|
|
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
|
|
cargo build --release --workspace --target armv7-unknown-linux-gnueabihf
|
|
|
|
RUN mkdir /out && cp -R /src/target/armv7-unknown-linux-gnueabihf/release/. /out
|
|
|
|
FROM scratch AS export-stage
|
|
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node / |