Search code examples
python-3.xdockerkivybuildozer

Cannot find buildozer.spec when run via docker on Windows 10


Versions

  • Python: 3.10.8
  • OS: Windows 10
  • Buildozer: 1.4.0

Description

I am on Windows 10 and installed Docker. And followed the instructions here: https://hub.docker.com/r/kivy/buildozer. The buildozer.spec file is not created and not found.

buildozer.spec

Command:

docker run -v "C:\GitHub\MyApp:/GitHub/MyApp" buildozer init

This gives me the output: File buildozer.spec created, ready to customize!

But no buildozer.spec is created and when I run:

docker run -v "C:\GitHub\MyApp:/GitHub/MyApp" buildozer android debug

It gives me the output: No buildozer.spec found in the current directory. Abandon.

I already tried to put a buildozer.spec in the folder "C:\GitHub\MyApp" But I then still get the output: No buildozer.spec found in the current directory. Abandon.


Solution

  • I think the problem is your host volume is not mounted to the correct directory in the buildozer docker container.

    Try changing:

    docker run -v "C:\GitHub\MyApp:/GitHub/MyApp" buildozer init

    To: docker run -v "C:\GitHub\MyApp:/home/user/hostcwd" buildozer init

    The reason I think this will work, is because if I look at the Dockerfile for buildozer, it's setting WORKDIR to ENV WORK_DIR="${HOME_DIR}/hostcwd" https://github.com/kivy/buildozer/blob/master/Dockerfile

    Hope this helps.