mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-29 04:05:21 +08:00
22 lines
836 B
Docker
22 lines
836 B
Docker
FROM messense/rust-musl-cross:armv7-musleabihf as build
|
|
|
|
ARG STACKS_NODE_VERSION="No Version Info"
|
|
ARG GIT_BRANCH='No Branch Info'
|
|
ARG GIT_COMMIT='No Commit Info'
|
|
ARG BUILD_DIR=/build
|
|
ARG TARGET=armv7-unknown-linux-musleabihf
|
|
WORKDIR /src
|
|
|
|
COPY . .
|
|
|
|
# Run all the build steps in ramdisk in an attempt to speed things up
|
|
RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
|
|
&& cd ${BUILD_DIR} \
|
|
&& rustup target add ${TARGET} \
|
|
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} --bin stacks-node --bin stacks-inspect --bin clarity-cli --bin blockstack-cli \
|
|
&& mkdir -p /out \
|
|
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
|
|
|
|
FROM scratch AS export-stage
|
|
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
|