ygrek / mldonkey

cross-platform multi-network p2p daemon
http://mldonkey.sourceforge.net/
Other
235 stars 43 forks source link

Add Dockerfile #65

Open nagius opened 3 years ago

nagius commented 3 years ago

This PR add the files needed to run MLDonkey with Docker using Ubuntu base image.

The Dockerfile is a multi-stage build that will compile the latest version of MLDonkey for the user's architecture, but will not bring development tools in the runtime image. And example of usage is provided with the docker-compose.yml file.

Note: This PR require https://github.com/ygrek/mldonkey/pull/64 to be merged to run with docker-compose properly.

DioxCorp commented 2 years ago

I have been a user of MLDonkey for many years, for me it is the best ED2k network client for linux and especially for microserver. I have the problem now in the most recent Ubuntu or Debian distros, which is no longer in the repositories and it is foreseeable that it will not be there again. An AppImage or similar version would be possible, since Docker is totally unknown to me and not I find hardly any info on it.

lulol commented 2 years ago

@nagius Dockerfile fails to compile with the default ubuntu (ubuntu:latest) as is currently setup.

ubuntu:latest uses OCaml version 4.13.1 configured with -force-safe-string while the mldonkey master use unsafe-string in configure.in options. #46

To avoid the trouble to anyone attempting to buid the container and until the master is fixed may be a good idea to pin the builder version to ubuntu:focal for which the build scripts download OCaml 4.01 directly and works fine again.


@DioxCorp you better open a separate issue with a feature request, but I wouldn't hold my breath. It's unfortunate that the MLDonkey package was dropped, but note that you won't need to use a Docker container to build this once the compilation issue with the new OCaml versions is solved. And then just need to clone the mldonkey repo, enable the gui option and compile it yourself.

jmferrer commented 1 week ago

With ubuntu 24.04 fails in docker build like this:

E: Unable to locate package libgd-gd2-noxpm-ocaml-dev

With ubuntu 22.04 build fails with:

/usr/bin/ocamlc.opt: OCaml has been configured with -force-safe-string: -unsafe-string is not available.
Usage: ocamlc <options> <files>
Try 'ocamlc --help' for more information.
make: *** [Makefile:5446: tools/ocamlpp.cmo] Error 2

With ubuntu 20.04 builds but I get this error in runtime:

option [ED2K-port] not_found in donkey.ini

Maybe because I have old data.

After some research I'm using the image carlonluca/mldonkey .

Anyway, the distributions where mldonkey can be compiled are or will be out of support in some months.

IMHO mldonkey-server is an essential piece of software but I don't have knowledge neither time to port it to a modern distribution. :-/

Do you plan to port mldonkey-server to make work in last debian or ubuntu versions?

carlonluca commented 1 week ago

https://github.com/carlonluca/docker-mldonkey is built on trixie, which is not even released yet.

jmferrer commented 1 week ago

https://github.com/carlonluca/docker-mldonkey is built on trixie, which is not even released yet.

Thank you!!! Works like a charm. :-)