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

feat: official docker images #12748

Open
maybeanerd opened this issue Aug 28, 2024 · 8 comments · Fixed by maybeanerd/mage#2 · May be fixed by #12828
Open

feat: official docker images #12748

maybeanerd opened this issue Aug 28, 2024 · 8 comments · Fixed by maybeanerd/mage#2 · May be fixed by #12828
Labels

Comments

@maybeanerd
Copy link

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

@magefree magefree deleted a comment Aug 28, 2024
@JayDi85 JayDi85 added the dev label Aug 28, 2024
@JayDi85
Copy link
Member

JayDi85 commented Aug 28, 2024

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);

@maybeanerd
Copy link
Author

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
Copy link
Author

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

@maybeanerd
Copy link
Author

maybeanerd commented Sep 7, 2024

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
Copy link
Author

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

@JayDi85
Copy link
Member

JayDi85 commented Sep 8, 2024

Look here: #12717 (comment)

@maybeanerd
Copy link
Author

maybeanerd commented Sep 8, 2024

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

I'll prepare a PR soon

@maybeanerd maybeanerd linked a pull request Sep 8, 2024 that will close this issue
@maybeanerd
Copy link
Author

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

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