-
-
Notifications
You must be signed in to change notification settings - Fork 886
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 ARM64 Docker image support #3810
Conversation
I'll test the image build locally |
I successfully built the image locally |
By default the BlackDex image uses PostgreSQL Lib v11 and OpenSSL v1.1. It may be a good idea to use the OpenSSL 3 images and use PostgreSQL v15 instead with this environment variable: |
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.
Works well on my dev machine. I've created a tag to start a woodpecker build, so we can see if this really works: https://woodpecker.join-lemmy.org/repos/129/pipeline/1889
The apt update command fails for some reason: https://woodpecker.join-lemmy.org/repos/129/pipeline/1889/21 |
I don't think this is an issue with the Dockerfile, probably something with the ci or maybe it was just random. I'm not sure. |
@dessalines Can you try running the build again? |
@dessalines Did the build work? I can't see it for some reason. |
The build timed out before it even reached the docker step. I tried it locally with the following command and it failed:
|
@Nutomic You need to use buildx to build the image. Try this: EDIT: Also make sure you have qemu on your system, it's needed for the last stage. |
Oops you'll probably also need qemu-user-static. You can install with your package manager on most systems. If you can't, you can run |
I'm running a test build in GitHub actions: https://github.com/TheSilkky/lemmy/actions/runs/5795677444/job/15707886913 I'm using this workflow, I haven't used woodpecker before so I won't be able to help much with that, but maybe this could give an idea of how to set it up idk. I'm pretty confident that the image works at this point, I think other issues are environmental. |
I installed those packages and restarted Docker but it still gave the same error. Then tried the docker run command and it worked with that. That dependency definitely needs to be documented in the comment/readme file. And that qemu dep is also necessary on all builders, right? We are running the builders from |
QEMU isn't required for all builders, only when you're building for a different arch than the host. In the case of |
Testing it again here: https://woodpecker.join-lemmy.org/repos/129/pipeline/2184 |
@dessalines Shit it failed again, it didn't even get to the docker build. Is there anyway we can only run the docker stage? |
@TheSilkky move the docker publish stuff above all the tests in |
Thanks, I'll start a new one depending on whether the current build fails. |
The image seemed to build successfully but it seems there was issue while pushing, maybe something to do with that warning about git or maybe a network issue?? EDIT: Oh wait you wouldn't want it to push anyway yet, right?? So this isn't an issue then. |
Hit a weird Context deadline error, but the AMD64 build seemed to work fine. Maybe the arm platform isn't setting DNS right? https://stackoverflow.com/questions/67057789/error-on-context-deadline-with-docker-whats-the-meaning I suggest trying to remove the AMD64 platform from woodpecker, so we can isolate the arm64 build and try again. |
At this point Docker is just pushing the layers to the registry, it's running directly on the host system, there's no virtualization or anything going on at this point. If it's a network issue it'll effect both builds the same, it's using the hosts network configuration. Idk though, in my experience with docker sometimes shit like this just happens, I say we should just run it again to be sure that this wasn't just a random unrelated network issue. |
K I started running it again. It looks like it did correctly do the arm64 builds tho: https://hub.docker.com/r/dessalines/lemmy/tags Just not sure why that build step is failing. |
One possibly small clue is that the |
Ugh, keeps failing. I'll try again: https://woodpecker.join-lemmy.org/repos/129/pipeline/2300/1 |
Huh, it worked. But as far as I can tell nothing has really changed, so I'm guessing this time we just got lucky. I think it's network issues, given that it times out while pushing the layers, but who knows. What OS are the runners using? |
Most of the runners are on ubuntu, and all of them have buildkit. But since this passed I'd say its ready to be merged. |
I understand that this step mentioned above should be added to woodpecker config, or is it not necessary anymore?
|
@Nutomic I don't think it's really necessary. It's just something that could be added if qemu related issues come up, which I don't think will happen on the runners. |
Hmm, no |
@TheSilkky would you be able to help out with #3972 |
Adds support for a ARM64 Docker image using cross compiling with BlackDex/rust-musl. Uses my Dockerfile at TheSilkky/lemmy-docker with minimal changes to support debug builds and cargo features. I wasn't able to test this Dockerfile specifically but it should work since it's pretty similar to my images.