Ask HN: 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!
15 comments
[ 2.9 ms ] story [ 35.1 ms ] threadI would suggest looking at Homebrew.
Many, many developers use Docker on Mac without issue
There is Docker Desktop and Colima you can use
Q: I need to run existing Docker containers on my Mac.
A: You have to use a VM; it's no big deal.
Q: What's the best way to package a new native Mac app?
A: Not containers.
If your audience is developers (or similarly tech-savvy), that's probably enough to package it up as `brew install my_pdf_parser` for Macs (and Chocolatey for Windows) and have them take care of the Python deps.
If you're going for a mainstream desktop app though, that's a bit harder, but there's stuff like https://pyinstaller.org/en/stable/ (edit: as you already mentioned in another comment, lol)
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/