-
Notifications
You must be signed in to change notification settings - Fork 673
SMQ-3173 - Use buildx for Multi-Platform Docker Image Support
#3181
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
base: main
Are you sure you want to change the base?
Conversation
b9780c9 to
9a544de
Compare
docker/Dockerfile.dev
Outdated
| 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 |
There was a problem hiding this comment.
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
.github/workflows/build.yaml
Outdated
| contents: read | ||
|
|
||
| steps: | ||
| - name: Free Disk Space (Ubuntu) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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.
ec60a0c to
064ada4
Compare
There was a problem hiding this 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.
|
@rodneyosodo Any updates on this? |
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
This image supports riscv and arm architectures Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
064ada4 to
f22eefe
Compare
riscv64 Architecture Support for Docker Image buildx for Multi-Platform Docker Image Support
Signed-off-by: Rodney Osodo <[email protected]>
6e41eab to
e5144ed
Compare
Makefile
Outdated
|
|
||
| docker build \ | ||
| docker buildx build --load \ | ||
| --platform linux/amd64 \ |
There was a problem hiding this comment.
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]>
dd57604 to
5cfbfa2
Compare
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]>
f23559b to
f515270
Compare
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?
riscv64Architecture Support for Official PostgreSQL Docker Image #3172Have you included tests for your changes?
Yes, tested manually https://hub.docker.com/r/rodneydav/supermq-users/tags
Did you document any new/modified feature?
Notes