Skip to content

Add ppc64le support to Docker image and static node build workflows #702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ jobs:
- {TAG_NAME: "cryptography-manylinux_2_31:armv7l", DOCKERFILE_PATH: "cryptography-linux", DOCKER_PLATFORM: "linux/arm/v7", BUILD_ARGS: "PYCA_RELEASE=manylinux_2_31_armv7l", RUNNER: "ubuntu-24.04-arm"}
- {TAG_NAME: "cryptography-musllinux_1_2:armv7l", DOCKERFILE_PATH: "cryptography-linux", DOCKER_PLATFORM: "linux/arm/v7", BUILD_ARGS: "PYCA_RELEASE=musllinux_1_2_armv7l", RUNNER: "ubuntu-24.04-arm"}

- {TAG_NAME: "cryptography-runner-ubuntu-24.04:ppc64le", DOCKERFILE_PATH: "runners/ubuntu", BUILD_ARGS: "RELEASE=24.04", RUNNER: "ubuntu-24.04-ppc64le"}
- {TAG_NAME: "cryptography-manylinux_2_28:ppc64le", DOCKERFILE_PATH: "cryptography-linux", BUILD_ARGS: "PYCA_RELEASE=manylinux_2_28_ppc64le", RUNNER: "ubuntu-24.04-ppc64le"}
- {TAG_NAME: "cryptography-manylinux2014:ppc64le", DOCKERFILE_PATH: "cryptography-linux", BUILD_ARGS: "PYCA_RELEASE=manylinux2014_ppc64le", RUNNER: "ubuntu-24.04-ppc64le"}

name: "${{ matrix.IMAGE.TAG_NAME }}"
steps:
- uses: actions/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-static-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
IMAGE:
- {RUNNER: "ubuntu-latest", MANYLINUX_ARCH: "x86_64"}
- {RUNNER: "ubuntu-24.04-arm", MANYLINUX_ARCH: "aarch64"}
- {RUNNER: "ubuntu-24.04-ppc64le", MANYLINUX_ARCH: "ppc64le"}
steps:
- uses: actions/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion cryptography-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM quay.io/pypa/${PYCA_RELEASE}
LABEL org.opencontainers.image.authors="Python Cryptographic Authority"
WORKDIR /root
RUN \
if [ $(uname -m) = "x86_64" ]; \
if [ $(uname -m) = "x86_64" ] || [ $(uname -m) = "ppc64le" ]; \
then \
if stat /etc/redhat-release 1>&2 2>/dev/null; then \
yum -y install binutils perl perl-IPC-Cmd && \
Expand Down
12 changes: 9 additions & 3 deletions staticnode/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:latest
ARG VERSION
# One of x64 or arm64
# One of x64 or arm64 or ppc64le
ARG ARCH
# The sha256sum for the node source tarball
ARG SHA256SUM
Expand All @@ -14,8 +14,14 @@ RUN mkdir -p /out/bin
RUN curl -O https://nodejs.org/dist/$VERSION/node-$VERSION.tar.gz
RUN echo "$SHA256SUM node-$VERSION.tar.gz" | sha256sum -c -
RUN tar -zxvf node-$VERSION.tar.gz
RUN cd node-$VERSION && ./configure --dest-cpu=$ARCH --fully-static && make -j$(nproc)
RUN cp /build/node-$VERSION/LICENSE /out/LICENSE && cp /build/node-$VERSION/out/Release/node /out/bin/node

RUN cd node-$VERSION && \
case "$ARCH" in \
ppc64le) CPU=ppc64 ;; \
*) CPU="$ARCH" ;; \
esac && \
./configure --dest-cpu=$CPU --fully-static && \
make -j$(nproc)

FROM scratch
COPY --from=0 /out/ /out
Loading