Skip to content

Commit 42403d0

Browse files
Refactor staticnode Dockerfile to support ppc64le architecture
1 parent e04306c commit 42403d0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

staticnode/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine:latest
22
ARG VERSION
3-
# One of x64 or arm64
3+
# One of x64 or arm64 or ppc64le
44
ARG ARCH
55
# The sha256sum for the node source tarball
66
ARG SHA256SUM
@@ -15,7 +15,13 @@ RUN curl -O https://nodejs.org/dist/$VERSION/node-$VERSION.tar.gz
1515
RUN echo "$SHA256SUM node-$VERSION.tar.gz" | sha256sum -c -
1616
RUN tar -zxvf node-$VERSION.tar.gz
1717
RUN cd node-$VERSION && ./configure --dest-cpu=$ARCH --fully-static && make -j$(nproc)
18-
RUN cp /build/node-$VERSION/LICENSE /out/LICENSE && cp /build/node-$VERSION/out/Release/node /out/bin/node
18+
RUN cd node-$VERSION && \
19+
case "$ARCH" in \
20+
ppc64le) CPU=ppc64 ;; \
21+
*) CPU="$ARCH" ;; \
22+
esac && \
23+
./configure --dest-cpu=$CPU --fully-static && \
24+
make -j$(nproc)
1925

2026
FROM scratch
2127
COPY --from=0 /out/ /out

0 commit comments

Comments
 (0)