mage icon indicating copy to clipboard operation
mage copied to clipboard

feat: official docker images

Open maybeanerd opened this issue 1 year ago • 9 comments

I recently found this project, and one of the first things I did was fork a community-run, somewhat outdated, repo to build images and update the workflow so that e.g. it builds for amd and arm, releases on the GitHub registry, etc.

https://github.com/maybeanerd/xmage

Now that "normal" releases are back, one could consider moving this process into this repository and publish official images.

Is there interest for this? If so, I could prepare a PR

maybeanerd avatar Aug 28 '24 10:08 maybeanerd

Feel free to experiment and support docker image. I saw current code and it's looks like another docker image from guesta (automatic check, build and publish new docker image on xmage release). So it can be useful.

If you look at tags history then can find old versions too: https://hub.docker.com/r/goesta/xmage-beta/tags I think it's can be important feature to download/use old versions (not only old, but release/beta/dev/etc).

I plan to integrate "update endpoint" with xmage server app, so launcher can be updated to actual version from any public server, not only from official website. After that docker images can be used more widely.

P.S. Just for info -- there is possible another useful static docker image with prepared run and update scripts (static image, on docker run it must check new version and update files/configs to actual version).

P.P.S. Future tools from my view:

  • docker's build tools to compile/build release and other versions from any local source (example implementation);
  • docker's images with specific app version (server/client/admin files);
  • docker's image with latest app version (see above about check and update on restart);

JayDi85 avatar Aug 28 '24 19:08 JayDi85

Awesome ideas! I see you already have many things in mind.

I'll prepare a first MVP that, in my current mind, would run on release of the repo and would "just" release an image for that version.

Based on that we could backfill older versions, trigger releases for dev or nightly builds, and even look into the self updating image you mentioned.

maybeanerd avatar Aug 28 '24 20:08 maybeanerd

Whoops that was an accident. Am testing around on my fork

maybeanerd avatar Aug 31 '24 21:08 maybeanerd

I think I need your help here. I got it to work quite well by using the zip included in the GitHub release (pipeline run )- and we've been using the resulting image to play for quite some time now.

But obviously the nicer approach is to actually build the source in the image (this allows to publish when the release is created, not only after the zip was added to the release) - which I am trying to do, but I'm getting the following error. Is this something typical, or how can you think this could be solved? I get this both on the latest main , as well as the state of the code from the last release. (pipeline run throwing the error)

#20 220.1 [ERROR] /Mage.Client/src/main/java/mage/client/dialog/WhatsNewDialog.java:[5,26] cannot access javafx.application.Platform
#20 220.1 [ERROR]   bad class file: /root/.m2/repository/org/openjfx/javafx-graphics/11.0.2/javafx-graphics-11.0.2-linux.jar(javafx/application/Platform.class)
#20 220.1 [ERROR]     class file has wrong version 54.0, should be 52.0
#20 220.1 [ERROR]     Please remove or make sure it appears in the correct subdirectory of the classpath.

You can find the Dockerfile with the context of how it's being built here: https://github.com/maybeanerd/mage/blob/feat/build-image-from-source/Dockerfile

maybeanerd avatar Sep 07 '24 22:09 maybeanerd

Huh. Might have solved it simply by bumping the maven image used to build. Will continue later, there's unrelated issues now.

maybeanerd avatar Sep 07 '24 22:09 maybeanerd

Look here: https://github.com/magefree/mage/issues/12717#issuecomment-2313341747

JayDi85 avatar Sep 08 '24 00:09 JayDi85

I had wrong envvars, which made it fail mysteriously. It now works!!

I'll prepare a PR soon

maybeanerd avatar Sep 08 '24 13:09 maybeanerd

^there it is. Please take a look, I'm open to any feedback!

maybeanerd avatar Sep 08 '24 14:09 maybeanerd

Hey all! Didn't notice the work going on over here and created my own docker container for XMage 😅 It's public over at https://github.com/UnstoppableMango/xmage-docker I looked through the PR and pulled in a couple things I was missing, such as the saved volume.

It sounds like there was some conversation about pushing stable and beta builds, and the container can build and test arbitrary refs from this (magefree/mage) repo. Perhaps some variation of this could be adapted to fit the build needs of XMage mentioned in the PR?

UnstoppableMango avatar Oct 11 '25 17:10 UnstoppableMango