eyeonus / Trade-Dangerous

Mozilla Public License 2.0
98 stars 31 forks source link

Purely for your record, here's a working Dockerfile #81

Closed jonathan-irvin closed 3 years ago

jonathan-irvin commented 3 years ago

So, using Python 3.9.1 and installing appJar + everything from requirements/dev.txt It pulls in the initial import via trade.py import -P eddblink -O clean,skipvend and then launches the GUI, attaching it to the Display.

Since Docker writes each line into cache, makes it easier to have everything in place right from the get-go.

Works on MacOS Big Sur, Windows 10, and Linux.

Screen Shot 2020-12-18 at 9 47 35 AM
eyeonus commented 3 years ago

Does not work on Windows:

"td_1 | _tkinter.TclError: couldn't connect to display ":0""

eyeonus commented 3 years ago

https://github.com/eyeonus/Trade-Dangerous/wiki/Setup-Guide#docker

jonathan-irvin commented 3 years ago

Yeah, because it's X11, there's even some setup that needs to happen on Mac and likely Windows.  Maybe  a gui version and a non gui version?

I'm guessing you disagree with the prepopulation step? I'd love to collaborate with you more on this.  If anything, to learn more about how it works.

-Jonathan On Dec 19, 2020, 01:01 -0600, Jonathan Jones notifications@github.com, wrote:

https://github.com/eyeonus/Trade-Dangerous/wiki/Setup-Guide#docker — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

eyeonus commented 3 years ago

I spent 4 hours searching the internet looking for a windows solution before finally giving up in disgust. I'm not willing to spend any more time on Docker at all. Ever.

I put the docker code on the wiki, I'm done.

If you have questions, I'll answer them to the best of my knowledge, but that's it.

eyeonus commented 3 years ago

It's not because X11, because 'host.docker.internal' is supposed to work on Windows and doesn't. The Dockerfile, according to Docker's manual, is supposed to work exactly as is, no need for the compose file at all. 4 hours of my life and this issue disagree: https://github.com/docker/for-win/issues/1976

The reason it works on Linux is not because 'host.docker.internal' works on Linux, either, because it's actually a known that it does not and never has worked on Linux, https://github.com/docker/for-linux/issues/264

I have absolutely no idea how or why, and it feels like a huge cludge to me, but including the two X volumes and that environment line in the compose file is literally the only reason it even works on Linux.

eyeonus commented 3 years ago

TD works right out of the box on a standard pip install on all three OSes, including when running the GUI. I'll grant that Python3 can be a bit finicky to install on those OSes, but unlike with Docker, those finicky bits are solvable in a reasonable amount of time.

The same can not be said for using Docker. 4 hours spent failing to fix a Docker problem is not reasonable. 2 hours spent trying to find out there is /no/ solution on Linux that doesn't involve a hacky cludge in a compose file is not reasonable. I will never enter the walled garden that is all things Apple, so I have no idea how easy it is to get this to work on a Mac, but I'm willing to bet that it's easier to install Py3 and run pip install tradedangerous on a Mac than it is to use Docker, based on my experience with installing Docker on Windows/Linux vs installing Py3 on same. Much, much, much easier to install Py3 and get a working TD install.

This means a Docker install is actually worse, not better, despite your claims.