-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add github-action and Dockerfile for multi-arch build #207
Conversation
On the whole, I'm not against removing operator-sdk from the build process. I think that's what happens in newer operator-sdk versions anyways. We are only using such an old versions because nobody has the time to upgrade. operator-sdk doesn't actually do anything during the build, just calls |
I am doing the first part of this using docker build containers -- that seemed easier for me :-| I will look into putting the result into |
So running distroless (but not static) is working for both arm64 and 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.
Overall looks good. I'd still like to try creating a distroless/static
image and also removing:
- the existing dockerfile + helper scripts
- the existing github action that builds+pushes using operator-sdk
|
||
.PHONY: update | ||
update: | ||
$(OPERATORSDKCMD) build --image-build-args "--no-cache=$(NOCACHE)" $(PROJECT):$(TAG) |
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.
Don't delete the whole makefile. Just replace this line with docker build -t $(PROJECT):$(TAG) --no-cache=$(NOCACHE) -f build/Dockerfile.multiarch .
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.
Needs to changed to -f build/Dockerfile
now
Signed-off-by: Philipp Riederer <priederer@tecracer.de>
About the failing pre-commit hook that checks for a correkt |
Please rename the dockerfile, we still need a working operator-sdk for some things. |
Thank you so much for your patience and all the good tips! |
Almost ready to merge, just missing the one fix on the Makefile. Already gave it a test run, seems to be working without issue, and we have a smaller image too 👍 |
Signed-off-by: Philipp Riederer <priederer@tecracer.de>
🎉 |
Thanks again |
The need for this change has been discussed in piraeusdatastore/piraeus#74
This change is probably not extremely elegant; I saw that the
operator-sdk
-version used by this repository is quite old. I am circumventing it here by "manually" building the go-code during building the docker image.I do not expect this to be merged like this, but I want to start a discussion...