Reputation: 3462
Having built a buildozer Docker based on the instructions on https://github.com/kivy/buildozer/, I try to run it and get an error:
kivyproject $ ls
main.py
buildozer.spec
setup.py
[...]
kivyproject $ docker run --volume "$(pwd)":/home/user/hostcwd buildozer android debug
# Ensure build layout
No buildozer.spec found in the current directory. Abandon.
Also, I find an empty directory was created next to kivyproject
called kivyproject;C
.
What is going on?
I'm running on Windows from a Git bash shell.
Upvotes: 0
Views: 1023
Reputation: 3462
My problem was that Docker the string passed to --volume
wasn't auto-translated by the Git bash shell to a Windows path, so Docker expected this:
--volume "c:\...\kivyproject:/home/user/hostcwd"
but got this:
--volume "/c/.../kivyproject:/home/user/hostcwd"
The solution was wrapping pwd
with cygpath -w
:
kivyproject $ docker run --volume "$(cygpath -w $(pwd))":/home/user/hostcwd buildozer android debug deploy
It was a good idea to share the cache too, so as not to re-download the SDK and NDK every time:
kivyproject $ docker run --volume "$(cygpath -w $HOME/.buildozer)":/home/user/.buildozer --volume "$(cygpath -w $(pwd))":/home/user/hostcwd buildozer android debug deploy
To troubleshoot this, I changed the last line of the Dockerfile
from ENTRYPOINT ["buildozer"]
to ENTRYPOINT ["bash"]
and then I could run docker run --volume [...] -it bulldozer
, get a shell and see that it was seeing an empty directory. Then I noticed a directory was created outside next to my working dir called workingdirname;C
and suspected cygwin path shenanigans.
Upvotes: 1