-
Notifications
You must be signed in to change notification settings - Fork 635
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
Build Docker Image for Arm64v8 #2380
Comments
The error you are receiving is because Unfortunately, at present, the grpc tools doesn't support ARM (grpc/grpc#22263). You can get around the grpc tools issue by building on a grpc tools supported platform and targeting the
As a side note, there are no plans to support building for |
Just want to bring this back from the dead a little bit... Currently just got a new M1 Macbook Air and it seems like maybe I should be able to work around this issue, but can't seem to figure it out. Has anyone been able to successfully run EventStore on an M1 chip? |
We'll have to wait for grpc/grpc#22263 (comment) to be solved . |
This is the milestone we need to keep an eye on : and the reason why it take so long: |
We released an alpha version of the ARM64 image. We're still testing it, but it looks promising! You have to use the GitHub Container registry image: https://github.com/EventStore/EventStore/pkgs/container/eventstore/7973829. Docker image: Example how to run the command:
You can also subscribe to PR #3076 to see the progress on the ARM64 build. |
@oskardudycz, worked for me on Apple M1 like a charm! Thanks so much! |
@ecwyne, great! If you noticed any unexpected behaviour, we'd be grateful for the feedback. I'll keep this ticket open until the regular ARM64 release is available 👍 |
The alpha image is working great on my M1 Max! Thank you! |
Very great job! Works quite well on my M1 too, thank you very much! |
@AlexandreDecollas, unfortunately, v5 is out of support at the end of the year, plus adding ARM support required quite of an effort, and making that work on v5 would be even harder. |
We hope to provide a non-alpha release in the following database version. I'll keep this issue open till now, but so far, so good. We're not aware of any specific ARM issues for this build. If you found any, we'd be grateful for the information. |
docker run -p 1113:1113 -p 2113:2113 ghcr.io/eventstore/eventstore:21.10.1-alpha-arm64v8 --insecure |
I see that 21.10.2 is the most recent available. |
Is there anything we can do to help push a non-alpha release? I've been using the alpha version of the arm image on my M1 Mac for the past month and found no issues so far. |
For those who use testcontainers and need to run their tests on multiple architectures, just use the default image in your tests: private static final GenericContainer eventStoreDb = new GenericContainer(DockerImageName.parse("ghcr.io/eventstore/eventstore:21.10.8-alpine"))
.withExposedPorts(2113)
.withEnv("EVENTSTORE_INSECURE", "true"); Then, create an image name substitutor to replace it when tests are run on M1 Mac: package com.kaffeinelabs.journal.eventstoredb.testcontainers;
import org.testcontainers.utility.DockerImageName;
import org.testcontainers.utility.ImageNameSubstitutor;
public class EventStoreImageNameSubstitutor extends ImageNameSubstitutor {
private static final String ARM_IMAGE = "ghcr.io/eventstore/eventstore:21.10.8-alpha-arm64v8";
@Override
public DockerImageName apply(final DockerImageName original) {
if (isEventStoreImage(original) && isRunOnAppleSilicon()) {
return DockerImageName.parse(ARM_IMAGE);
}
return original;
}
@Override
protected String getDescription() {
return "Substitutes EventStoreDB image name if run on Apple silicon.";
}
private static boolean isRunOnAppleSilicon() {
return "aarch64".equals(System.getProperty("os.arch", "unknown"));
}
private static boolean isEventStoreImage(final DockerImageName original) {
return "ghcr.io/eventstore/eventstore".equals(original.getUnversionedPart());
}
} Register the image name substitutor in image.substitutor=com.kaffeinelabs.journal.eventstoredb.testcontainers.EventStoreImageNameSubstitutor |
It would be really handy to have a single docker tag, supporting both x86_64 and arm64 :) |
@jokesterfr Thanks for the feedback, glad to hear that. The plan is to have 1 single multi-architecture image once we officially support ARM64. 😄 |
Hi, I wrote an article to make it look easy. |
Hey @mohammadsaadshafiq! Thanks for the suggestion to specify the
Thats when building ESDB |
…bstitutor for Apple silicon This is required until the arm image is officially published. See EventStore/EventStore#2380 (comment)
Hi, Is that happening any time soon? Thanks! |
Not yet. It is planned, but it's more tricky than we originally thought, and we have some things with higher priority right now. |
Alright, thanks for the quick response! |
I was trying to build docker image for an arm64v8 architecture. I got this error:
I followed these steps:
1- I edited the docker file with the proper base image and arguments:
2- Activated docker buildx command for cross platform compilation, then build the image:
docker buildx build --platform linux/arm64 .
I got this message:
Anyone could help ?
DB-28
The text was updated successfully, but these errors were encountered: