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
Docker image workflow (publish on ghcr.io
)
#14230
Conversation
The use of qemu cannot be avoided since Github does not provide any ARM runners. I'd simply drop it. |
Isn't arm support interesting enough for raspberry pi users? The CI is basically free so my biggest concern was the longer time for the CI to finish in stuff like PRs. That could perhaps be improved by using a matrix strategy so the two builds are visually separated. |
Docker support cross compilation in the image build process, but it requires modifications of the Dockerfile. https://docs.docker.com/build/guide/multi-platform/#build-using-cross-compilation GCC is also not straightforward to setup for cross-compilation, so I think its better to just drop the QEMU based arm build and later think about allowing cross-compilation in the the Dockerfile. |
ghcr.io
, amd64
+ arm64
)ghcr.io
)
I dropped the |
On the topic of cross compilation, this seems to be a pretty useful tool: |
4b2413c
to
a4cc344
Compare
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: sfan5 <sfan5@live.de>
Hmm, now it doesn't run for the PR anymore? |
Failed to start: https://github.com/minetest/minetest/actions/runs/8254040414 |
I still need to fix the image metadata |
I have put Is it fine or should I go with the For reference: https://spdx.org/licenses |
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: sfan5 <sfan5@live.de>
Looks good apart from that |
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.
Looks good
On a side note after merge the package should be set as public in it's settings. At least on my account it's private by default and only visible to the repository maintainers (it's confusing IMO, there is no clear indication that it's private in the maintainers view). |
Should fix #14164
Follows the official Docker documentation to build image using GitHub Actions workflows.
Official Actions by Docker are used.
Links:
Tags are automatically determined by the Docker metadata Action.
You can find how its done here
Please note that the build of thearm64
image takes a much longer time than theamd64
one. This is due to the use of QEMU for the build process, following the Docker documentation. It may be possible to not require the use of QEMU by modifying the Dockerfile but I don't have the knowledge to do so.To do
This PR is a Work in Progress.
Should the workflow use a matrix strategy for the architectures?No more arm64--version
in CIMore architectures? (alpine supported architectures) Or removeRequire cross-compilation support in Dockerfile.arm64
?How to test
Merge the branch into one of your forks of Minetest, see the workflow run, see the container in the package section of the repository. See the two architectures. Pull the image and see if it runs.
In my case:
docker run ghcr.io/afcms/minetest:master /usr/local/bin/minetestserver --version
works