-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(3847) - Adding/updating Dockerfiles for ARM arch
- Loading branch information
Showing
7 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM rust:bullseye 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-gnueabihf | ||
WORKDIR /src | ||
|
||
COPY . . | ||
|
||
RUN apt-get update && apt-get install -y git gcc-arm-linux-gnueabihf | ||
|
||
# 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} \ | ||
&& 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 --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \ | ||
&& 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 / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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} \ | ||
&& 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 / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters