Skip to content

Conversation

@rodneyosodo
Copy link
Contributor

@rodneyosodo rodneyosodo commented Oct 13, 2025

What type of PR is this?

This is a feature because it adds riscv support

What does this do?

Adds riscv support

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

Yes, tested manually https://hub.docker.com/r/rodneydav/supermq-users/tags

image

Did you document any new/modified feature?

Notes

@rodneyosodo rodneyosodo requested a review from a team as a code owner October 13, 2025 11:13
@rodneyosodo rodneyosodo force-pushed the feat/riscv-support branch 3 times, most recently from b9780c9 to 9a544de Compare October 13, 2025 11:25
ARG SVC
COPY $SVC /exe
COPY --from=alpine:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for naming alpine stage (FROM alpine:3.22 AS alpine), we can use COPY --from=alpine:3.22 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

contents: read

steps:
- name: Free Disk Space (Ubuntu)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because we run out of space when building the images. I had initially started with a larger pool darwin/amd64,darwin/arm64,freebsd/amd64,freebsd/arm64,netbsd/amd64,netbsd/arm64,openbsd/amd64,openbsd/arm64,linux/amd64,linux/arm64,linux/riscv64,windows/amd64,windows/arm64, this is when I experienced it

Makefile Outdated
$(eval svc=$(subst docker_,,$(1)))

docker build \
--platform linux/amd64,linux/arm64,linux/riscv64 \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's switch to buildx.

@rodneyosodo rodneyosodo force-pushed the feat/riscv-support branch 2 times, most recently from ec60a0c to 064ada4 Compare October 13, 2025 12:44
Copy link
Collaborator

@dborovcanin dborovcanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's create separate build tags for RISC V and ARM, and have them outside of the regular CI push so we don't waste our CI time on it.

@dborovcanin
Copy link
Collaborator

@rodneyosodo Any updates on this?

@rodneyosodo rodneyosodo changed the title SMQ-3173 - Add riscv64 Architecture Support for Docker Image SMQ-3173 - Use buildx for Multi-Platform Docker Image Support Nov 4, 2025
Makefile Outdated

docker build \
docker buildx build --load \
--platform linux/amd64 \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a Makefile target for building and tagging dockers for different architecture.

Signed-off-by: Rodney Osodo <[email protected]>
For Linux ARM64:
make publish_arch GOOS=linux GOARCH=arm64

For Linux RISC-V 64:
make publish_arch GOOS=linux GOARCH=riscv64

For Linux ARM v7:
make publish_arch GOOS=linux GOARCH=arm GOARM=7

Signed-off-by: Rodney Osodo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add riscv64 Architecture Support for Official PostgreSQL Docker Image

2 participants