Closed rawpixel-vincent closed 5 months ago
Hi @timothycarambat
thanks for looking at this, I reckon one downside of this update is it increase the time to publish the docker image, as running docker build for arm64 on github runner is quiet slow, basically adds 20 minutes to the current run.
if that's an issue to move forward, I can have a look to split the workflow so that linux-amd64 runs before arm64
@rawpixel-vincent Thanks for this contribution and your work so far!
20 minutes is so long! However, that piece is really out of our control. I have no opposition to adding this into the build honestly, but my current question is around the why of having the ARM support. Are you running VA on an ARM instance somewhere? It was my current understanding that an ARM host with docker could emulate the x86 arch, but not the other way around. Obviously doing so would require additional emulation overhead and would lose any performance gains ARM might yield.
Just want to probe more on the intention and be more educated before merging
yes I do run it on an arm instance. The short answer is you can do both, but, as you said running the container in emulation will impact the performance a lot, as you can see from the time to build for arm64 on amd64. The intended purpose of the emulation is to make it possible to build your image for multiple platform. hope that makes sense!
@rawpixel-vincent on this PR can you enable Allow edits from maintainers.
(right sidebar, very bottom option) I solved the merge conflicts for you and also made some small tweaks for dual-building of the image
done @timothycarambat 👍🏻
To add linux-arm64 platform to the published images
I've made a branch on the fork to test the github actions without push and login to the registry
last build logs: https://github.com/rawpixel-vincent/vector-admin/actions/runs/7369657202/job/20055207028
I think it also means the platform in docker-compose can be removed https://github.com/Mintplex-Labs/vector-admin/blob/6cad8a30a1a89f645e02e0663ccf8832dfe87047/docker/docker-compose.yml#L25
update: I'm running the arm64 build from this Dockerfile on an amazon linux 2023 t4g.small instance