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

Add Dockerfile #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Dockerfile #65

wants to merge 1 commit into from

Conversation

nagius
Copy link

@nagius nagius commented Jun 26, 2021

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 #64 to be merged to run with docker-compose properly.

@DioxCorp
Copy link

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

lulol commented Jun 20, 2022

@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.

lulol added a commit to lulol/mldonkey that referenced this pull request Jun 26, 2022
Builds an appimage with mlnet+gui executable. ygrek#65 (comment)

git clone https://github.com/ygrek/mldonkey.git
cd mldonkey
./configure --enable-batch --disable-directconnect --disable-fasttrack --disable-gnutella --disable-gnutella2 --enable-gui=newgui2 --prefix=/usr
make
wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.0.3/appimage-builder-1.0.3-x86_64.AppImage
appimage-builder-1.0.3-x86_64.AppImage

To run the optional appimage-builder tests you need docker installed and permissions.
@lulol lulol mentioned this pull request Jun 26, 2022
@jmferrer
Copy link

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

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

@jmferrer
Copy link

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

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

@ygrek
Copy link
Owner

ygrek commented Jul 30, 2024

I have no experience with docker, in order to make sure this works please add github action workflow to build it

@ygrek ygrek force-pushed the master branch 14 times, most recently from 28754fe to 05908f6 Compare August 27, 2024 01:28
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.

6 participants