boxes icon indicating copy to clipboard operation
boxes copied to clipboard

Dockerfile for running Boxes.py on windows

Open tinohager opened this issue 1 year ago • 7 comments

  • Fix wrong cursor on main menu image
  • Allow build docker on windows with local sources

tinohager avatar Aug 13 '22 19:08 tinohager

I wonder if using a bind mount for the sources would be even easier to use. I don't have any experience with docker on Windows but I think that should work even with windows not using bind mounts itself. That way you can continue to work on your local checkout with your local tools while still testing the changes running locally in your container.

florianfesti avatar Aug 14 '22 09:08 florianfesti

Yes, that would certainly still work. I wanted to test my changes before I make the commit. Since I am otherwise using other programming languages, docker was of course my first choice here. And of course it doesn't help me much if the docker then gets the files from the GitHub repository.

tinohager avatar Aug 14 '22 19:08 tinohager

@florianfesti Do you want to implement the change here with the bind mount?

tinohager avatar Aug 16 '22 19:08 tinohager

May be we can just have both variants in the Dockerfile with one being commented out. default can what ever you find more useful for developing under Windows. I really have no experience with that. My gut instinct tells me the bind mount might be easier to use.

florianfesti avatar Sep 06 '22 16:09 florianfesti

I grabbed the other fixes and merged them into the master branch after cleaning them up a bit. So we make some progress on the PR at least.

florianfesti avatar Sep 06 '22 16:09 florianfesti

@florianfesti i have add the infos for the bind mount in the Dockerfile also fix a second issue with python3 files without extension.

docker run -ti -p 4000:8000 -v %cd%/scripts:/boxes/scripts boxes.py

tinohager avatar Sep 09 '22 19:09 tinohager

Sometimes the request from the web server hangs in Docker only when reloading the page comes. But I don't think this is a problem that only occurs under Windows

tinohager avatar Sep 09 '22 20:09 tinohager

I get this when trying to run the container :(

Traceback (most recent call last):
  File "/boxes/scripts/boxesserver", line 35, in <module>
    import qrcode
ModuleNotFoundError: No module named 'qrcode'

jondkelley avatar Mar 05 '23 03:03 jondkelley

Yes, python3-qrcode is a new dependency. I think I added that to the dockerfile in the repo but you may need to adjust your own copy.

florianfesti avatar Mar 05 '23 10:03 florianfesti