Skip to content

Commit b3de84a

Browse files
committed
(3847) - Adding/updating Dockerfiles for ARM arch
1 parent b70dd00 commit b3de84a

File tree

7 files changed

+57
-2
lines changed

7 files changed

+57
-2
lines changed

.github/actions/dockerfiles/Dockerfile.alpine-binary

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ ARG TARGETPLATFORM
77
ARG BUILDPLATFORM
88
ARG TARGETARCH
99
ARG TARGETVARIANT
10-
ARG REPO=stacks-network/stacks-blockchain
10+
ARG REPO=stacks-network/stacks-core
1111

1212
RUN case ${TARGETARCH} in \
1313
"amd64") BIN_ARCH=linux-musl-x64 ;; \
1414
"arm64") BIN_ARCH=linux-musl-arm64 ;; \
15+
"arm") BIN_ARCH=linux-musl-armv7 ;; \
1516
"*") exit 1 ;; \
1617
esac \
1718
&& echo "wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip" \

.github/actions/dockerfiles/Dockerfile.debian-binary

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ ARG TARGETPLATFORM
77
ARG BUILDPLATFORM
88
ARG TARGETARCH
99
ARG TARGETVARIANT
10-
ARG REPO=stacks-network/stacks-blockchain
10+
ARG REPO=stacks-network/stacks-core
1111

1212
RUN case ${TARGETARCH} in \
1313
"amd64") BIN_ARCH=linux-musl-x64 ;; \
1414
"arm64") BIN_ARCH=linux-musl-arm64 ;; \
15+
"arm") BIN_ARCH=linux-musl-armv7 ;; \
1516
"*") exit 1 ;; \
1617
esac \
1718
&& echo "wget -q https://github.com/${REPO}/releases/download/${TAG}/${BIN_ARCH}.zip -O /${BIN_ARCH}.zip" \

build-scripts/Dockerfile.linux-glibc-arm64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
2424

2525
FROM scratch AS export-stage
2626
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
27+
## comment
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM rust:bullseye as build
2+
3+
ARG STACKS_NODE_VERSION="No Version Info"
4+
ARG GIT_BRANCH='No Branch Info'
5+
ARG GIT_COMMIT='No Commit Info'
6+
ARG BUILD_DIR=/build
7+
ARG TARGET=armv7-unknown-linux-gnueabihf
8+
WORKDIR /src
9+
10+
COPY . .
11+
12+
RUN apt-get update && apt-get install -y git gcc-arm-linux-gnueabihf
13+
14+
# Run all the build steps in ramdisk in an attempt to speed things up
15+
RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
16+
&& cd ${BUILD_DIR} \
17+
&& rustup target add ${TARGET} \
18+
&& CC=arm-linux-gnueabihf-gcc \
19+
CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \
20+
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
21+
cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
22+
&& mkdir -p /out \
23+
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
24+
25+
FROM scratch AS export-stage
26+
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /

build-scripts/Dockerfile.linux-glibc-x64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
2121

2222
FROM scratch AS export-stage
2323
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /
24+
## comment
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM messense/rust-musl-cross:armv7-musleabihf as build
2+
3+
ARG STACKS_NODE_VERSION="No Version Info"
4+
ARG GIT_BRANCH='No Branch Info'
5+
ARG GIT_COMMIT='No Commit Info'
6+
ARG BUILD_DIR=/build
7+
ARG TARGET=armv7-unknown-linux-musleabihf
8+
WORKDIR /src
9+
10+
COPY . .
11+
12+
# Run all the build steps in ramdisk in an attempt to speed things up
13+
RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
14+
&& cd ${BUILD_DIR} \
15+
&& rustup target add ${TARGET} \
16+
&& cargo build --features monitoring_prom,slog_json --release --workspace --target ${TARGET} \
17+
&& mkdir -p /out \
18+
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
19+
20+
FROM scratch AS export-stage
21+
COPY --from=build /out/stacks-inspect /out/blockstack-cli /out/clarity-cli /out/stacks-node /

build-scripts/build-dist.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ case $DIST_TARGET_FILTER in
1717
case $DIST_TARGET_FILTER in
1818
linux-glibc-x64) build_platform linux-glibc-x64 ;;
1919
linux-glibc-arm64) build_platform linux-glibc-arm64 ;;
20+
linux-glibc-armv7) build_platform linux-glibc-armv7 ;;
2021
linux-musl-x64) build_platform linux-musl-x64 ;;
2122
linux-musl-arm64) build_platform linux-musl-arm64 ;;
23+
linux-musl-armv7) build_platform linux-musl-armv7 ;;
2224
windows-x64) build_platform windows-x64 ;;
2325
macos-x64) build_platform macos-x64 ;;
2426
macos-arm64) build_platform macos-arm64 ;;
@@ -32,8 +34,10 @@ case $DIST_TARGET_FILTER in
3234
echo "Building distrubtions for all targets."
3335
build_platform linux-glibc-x64
3436
build_platform linux-glibc-arm64
37+
build_platform linux-glibc-armv7
3538
build_platform linux-musl-x64
3639
build_platform linux-musl-arm64
40+
build_platform linux-musl-armv7
3741
build_platform windows-x64
3842
build_platform macos-x64
3943
build_platform macos-arm64

0 commit comments

Comments
 (0)