Skip to content
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

Provide Docker Image for multiple Architectures #1270

Closed
raynigon opened this issue Dec 16, 2024 · 8 comments
Closed

Provide Docker Image for multiple Architectures #1270

raynigon opened this issue Dec 16, 2024 · 8 comments
Assignees
Labels
community requested Issues requested by our community enhancement New feature or request released Released, waiting for feedback

Comments

@raynigon
Copy link

Is your feature request related to a problem? Please describe.

'm always frustrated when I need to run the docker image on a M-Chip MacOS Machine.

Describe the solution you'd like

The Docker Image should be provided for multiple architectures

Describe alternatives you've considered

Emulations is working, but can be extremly slow.

@raynigon raynigon added the enhancement New feature or request label Dec 16, 2024
@nagyesta
Copy link
Owner

Hi @raynigon ,
thank you for opening this issue and thank you for using Lowkey Vault!

I assume you have missed the ARM builds section here. It leads to the multiarch build project: https://github.com/nagyesta/lowkey-vault-docker-buildx

Does this resolve your issue?

@nagyesta nagyesta self-assigned this Dec 16, 2024
@nagyesta nagyesta added the community requested Issues requested by our community label Dec 16, 2024
@raynigon
Copy link
Author

raynigon commented Jan 5, 2025

Thank you, I missed the section.

While an image exists for ARM with the ubi9-minimal tag suffix, the basic image only exists for amd64.
Is this intended? If so, could you explain why please.

At least on my end, this was a bit confusing, because everything worked on the amd64 machine, but failed on arm.
IMO it would be a better Developer experience if all images were available on all platforms.

@nagyesta
Copy link
Owner

nagyesta commented Jan 5, 2025

Hi @raynigon ,
thank you for the feedback! I had the following main reasons to use this approach:

  1. Historically, there was only an amd64 image (the one in the main project). As I was new to multiarch builds and I just needed a quick solution to resolve a request it was easier for me to set up a new project just for the multiarch docker build than adjust the existing one with buildx.
  2. The original image is almost 30% smaller according to Docker Hub and in my experience it tends to be faster patched compared to the ubi9-minimal base images which I am using.
  3. The pipeline I am using for buildx is harder to maintain as it breaks more often.
  4. Building multiarch images is slower and makes any kind of maintenance slower on the main branch.
  5. I don't know how good buildx support is on Windows. So I am not sure how well it would work out if someone used Windows to contribute in the future.

With that said, it is kind of a headache for me as well to maintain two repositories instead of one, so I would be happier if there was only one image and one pipeline to maintain, but considering the aforementioned reasons, I am not ready to make this tradeoff yet, It would need some further work to find out how I can mitigate all of these issues.

As a bandaid, I can offer to improve the documentation and make it easier to notice that there are two kinds of images and highlight which one is needed when. Would that make sense?

@raynigon
Copy link
Author

raynigon commented Jan 5, 2025

Hi @nagyesta ,

This information is really helpful!
Thank you very much.

I understand the issues, especially the problems related to mutliplatform support on windows.
It would be nice if you could add this explaination into the ARM section, or reference this issue there.
IMO This should be enough documentation.

For a Quickfix in the testcontainer, I propose the following logic:
A check should be added to compare the given docker image and the platform.
If an incompatibility is detected, the link to the documentation (ARM section) should be displayed.
The builder in the testcontainer fails, with an exception to the developer is pointed to the documentation.
The check should only be executed for the "original" images, therefore the user can simply use their own images.

@nagyesta
Copy link
Owner

nagyesta commented Jan 5, 2025

Hi @raynigon ,
thank you for the suggestions! I will take a look and see what I can do about this. You can track updates on this ticket when I get there.

@nagyesta nagyesta moved this from Ideas to Todo for next increment in Lowkey Vault Roadmap Jan 5, 2025
@nagyesta nagyesta moved this from Todo for next increment to In progress in Lowkey Vault Roadmap Jan 21, 2025
nagyesta added a commit that referenced this issue Jan 21, 2025
- Update readme files to mention multi-arch images more prominently
- Implement new check in the LowkeyVaultContainer to recommend multi-arch images when it could be beneficial
- Add new tests

Updates #1270
{minor}

Signed-off-by: Esta Nagy <[email protected]>
nagyesta added a commit that referenced this issue Jan 21, 2025
- Update readme files to mention multi-arch images more prominently
- Implement new check in the LowkeyVaultContainer to recommend multi-arch images when it could be beneficial
- Add new tests

Updates #1270
{minor}

Signed-off-by: Esta Nagy <[email protected]>
nagyesta added a commit that referenced this issue Jan 21, 2025
- Update readme files to mention multi-arch images more prominently
- Implement new check in the LowkeyVaultContainer to recommend multi-arch images when it could be beneficial
- Add new tests

Updates #1270
{minor}

Signed-off-by: Esta Nagy <[email protected]>
nagyesta added a commit to nagyesta/lowkey-vault-docker-buildx that referenced this issue Jan 21, 2025
- Update readme file to mention multi-arch tag name
- Update Lowkey Vault version to latest

Updates nagyesta/lowkey-vault#1270

Signed-off-by: Esta Nagy <[email protected]>
@nagyesta
Copy link
Owner

Hi @raynigon ,
I have updated the readme files to make it more visible that we have multi-arch images. Also, I have added some modifications to the Testcontainers module to add some warning logs if:

  1. The official image is used
  2. The image is amd64 only (the one without suffix)
  3. The host arch is NOT amd64

The logs should look like this:

An amd64 image is detected with non-amd64 (arm64) host.
Please consider using a multi-arch image, like: 2.8.0-ubi9-minimal
See more information: https://github.com/nagyesta/lowkey-vault/tree/main/lowkey-vault-docker#arm-builds

I decided against throwing an exception because I wanted to keep the end user in control, if someone wants to use the amd64 image with emulation, then they can easily do it and it will only generate some log lines.

What do you think? Is this an acceptable compromise for you or did I miss some vital aspect?

Thank you in advance for your feedback!

@nagyesta nagyesta moved this from In progress to Released in Lowkey Vault Roadmap Jan 21, 2025
@nagyesta nagyesta added the released Released, waiting for feedback label Jan 21, 2025
nagyesta added a commit to nagyesta/lowkey-vault-docker-buildx that referenced this issue Jan 21, 2025
- Update readme file to mention multi-arch tag name
- Update Lowkey Vault version to latest

Updates nagyesta/lowkey-vault#1270

Signed-off-by: Esta Nagy <[email protected]>
@raynigon
Copy link
Author

raynigon commented Jan 22, 2025

I looked through your code and I think this solution should solve this issue in all relevant aspects!
I hope the changes will help other users to quickly find the mutli platform images.

Thank you very much!

@nagyesta
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community requested Issues requested by our community enhancement New feature or request released Released, waiting for feedback
Projects
Archived in project
Development

No branches or pull requests

2 participants