HACKER Q&A
📣 gmzi

Docker for a Mac App?


Hi folks, I'm building a Mac utility to extract and process data from local PDF files. I use Python for crawling PDFs and Java for processing the data. I'd like to be able to share this program with other computers (mostly Macs and a couple with Windows) that don't have Python or Java installed. I've heard Docker might be a solution, but since I've never used it before, I'd like to ask you all if Docker is the right tool for this task or if there's a better one I should consider studying. In any case, it will be my first experience with containers. All hints are very welcome, and thanks!


  👤 runjake Accepted Answer ✓
As other comments have mentioned, this isn't what Docker is for.

For Python, you'd use something like Py2App or whatever the current thing is. And Py2Exe for Windows.

https://py2app.readthedocs.io/en/latest/

https://pypi.org/project/py2exe/

PS: I typed your question into GPT 4 verbatim and it pointed me to PyInstaller, as well.

https://pyinstaller.org/en/stable/


👤 verdverm
Are your users technical enough to run containers and install Docker Desktop / Colima?

👤 solardev
This sounds like a horribly bloated stack. Might it be possible to compile the Python part into a lib that the Java app can access? And then package the Java app as a distributable, maybe with a JRE bundled?

👤 wmf
No, Docker is not right for this, mostly because Docker does not actually run on Mac; it runs on a Linux VM. MacOS doesn't really support containers.

I would suggest looking at Homebrew.


👤 yuppie_scum
Python is cross-platform. Java is cross-platform.