mywave82 / opencubicplayer

Open Cubic Player (unix fork). Music visualizer for various tracked music formats (amiga modules, S3M, IT), chiptunes and other formats related to demoscene
https://stian.cubic.org/project-ocp.php
GNU General Public License v2.0
283 stars 19 forks source link

Docker version #68

Open corasaniti opened 1 year ago

corasaniti commented 1 year ago

It would be nice have a docker container version. Could you consider the possibility of a docker build? Thank you PC

mywave82 commented 1 year ago

I do not have the resources to maintain external builds. The builds for Debian, Slackware etc. are handled by external volunteers often referred to as packagers that often maintains a set of packages for their system. If you want to maintain and/or submit such to the docker community you are welcome to do this.

hhromic commented 1 year ago

Hi all, The original Open Cubic Player back in the day was really awesome for me and I only recently found out this Unix port :) I decided to make a Docker image for this project and the result is here: https://github.com/hhromic/opencubicplayer-docker

If you have latest WSL2 in Windows 10/11 with WSLg enabled and Docker Desktop, you can run Open Cubic Player with MIDI playback support out of the box simply like this:

docker run --rm -it \
  -v /path/to/media:/media:ro \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v /mnt/wslg:/mnt/wslg \
  -e DISPLAY -e PULSE_SERVER \
  ghcr.io/hhromic/opencubicplayer-midi:latest \
  ocp-sdl2 -spdevpSDL2

A similar command should work too in Linux and macOS if the correct audio devices into the container. At the moment I don't have a Linux/macOS machine to test myself and provide more precise commands :(

There is also a smaller image without the MIDI Soundfont: ghcr.io/hhromic/opencubicplayer:latest More information can be found in my repository.

@mywave82 feel free to include a link to this in your README here if you want! If you have feedback or any requests about these images, just let mek now.

Thank you very much for porting Open Cubic Player to modern Unix systems. Really a blast from the past! 💯

mywave82 commented 1 year ago

I will leave the bug-report open for now since we probably need to test this from Linux, and I am not a docker user myself.

and long goal will be to add the documentation into the source-tree

hhromic commented 1 year ago

I will try to test for Linux myself. Probably will setup a VM with a recent Linux distro such as Debian/Ubuntu. If you want me to test using another specific Distro, let me know and I can test that too for your satisfaction.

I'm confident the image will work in Linux. I mostly want to confirm the exact docker run commands to use in a real Linux environment so I can provide them in the README documentation. Will keep you posted.

And thanks again for this Unix fork of OCP!

hhromic commented 1 year ago

Hi @mywave82 ! I finally got some time to test the Docker images in Linux (via Virtual Box). The images work very well and I now compiled working command-line examples for them in the README of my repository.

and long goal will be to add the documentation into the source-tree

I would like to make progress on this. What do you have in mind?

The Dockerfile that generates the Docker images is pretty much the equivalent of packaging spec files in ordinary distros. I can happily volunteer as maintainer for the Docker "platform" if that is easier for you. Otherwise, we could move the content of my repository (Dockerfile and README) here if you prefer. Future updates (new versions) can be sent to you via PRs.

The Docker images can be built locally or hosted in a public registry like I'm doing in my repository with GHCR. The latter is very convenient for users as they can directly run Open Cubic Player with a single command.

Let me know!