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

Draft: Add support for ARM #10

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

Kellegram
Copy link

As hosting a minecraft sever on the free Oracle ARM servers is fairly popular, I figured it's worth adding support for that. I have a server of my own on Oracle and have tested this change in my repo, all works well and saves people having to run
docker buildx build --platform linux/arm64 -t ghcr.io/maxi0604/create-astral:v2.1 --load .

Adds very minimal build time since this is a relatively small project so I didn't split the builds, it takes less than 3 minutes total. Let me know if anything else needs to be done.

@maxi0604
Copy link
Owner

maxi0604 commented Oct 9, 2024

Thanks for the effort. Two questions:

  • The PR seems to include a QEMU build step. Isn't that a bit overkill if we don't actually compile native code for the platform but just unzip, untar and move JARs around? After a short look at the documentation, it seems to me like "cross-building" container images without full emulation is workable in that case.
  • I think this breaks the included RCON binary, since the Dockerfile downloads it for x64. Iirc upstream does provide an ARM binary but if not, it could be dropped on ARM.

@Kellegram
Copy link
Author

Hi,

  • Not sure, I tried without QEMU and it didn't work, but I may have done something wrong. I will give it another test in a cleaner environment and report back.
  • Ahh yeah I see what you mean with RCON. I've had a look and I can see that it has a version for ARM, so all good there, would just need to adjust the download then. I will have a look at skipping QEMU first.

@Kellegram
Copy link
Author

Kellegram commented Oct 9, 2024

Scratch that, it includes arm64_darwin, but not arm64_linux. Odd...
The build does indeed work tho without QEMU, I must have had something else cause the failure when testing originally.

Based on last update and the issue's age (gorcon/rcon-cli#44) I am guessing it won't be made available in that repo. It seems like there's a container for it from itzg that has an arm64 build.

@Kellegram
Copy link
Author

Not having much success trying to use rcon-cli or rcon from itzg. The container can't connect to create-astral service no matter what I try, so not sure what would be the best alternative for that. The server itself works great.

@Kellegram
Copy link
Author

@maxi0604 Ok so, I could not get itzg/rcon-cli working, but I got itzg/rcon working. This is a big change of course, a web ui that needs to be exposed if hosted outside of the house, so I understand if this is not something you want here, but let me know. If not I will maintain my own fork, I don't mind. Alternatively if you have a different idea I don't mind spending some time trying to PR a fix.
image

@Kellegram
Copy link
Author

Instead of using the rcon-cli container that I couldn't get working, I am trying to use your method of just unpacking, I added a switch case for platforms, more could be added pretty easily if needed this way. There is no rcon.yaml file, in my proposed way it's just mounted in the compose file but could also be created in the dockerfile and placed in the right place. I modified the rcon shell script according to the expected format in itzg/rcon-cli. I need to run another test when I get home still.

@Kellegram Kellegram changed the title Add support for ARM Draft: Add support for ARM Oct 11, 2024
@Kellegram Kellegram marked this pull request as draft October 11, 2024 15:43
@Kellegram
Copy link
Author

I have gotten the itzg/rcon-cli binary to work now and tested on an oracle vps (not actually using the itzg container, just the rcon binary), so this should make this container more universal, not sure if there's much point adding the other architectures, but it will be easy to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants