Last active
April 8, 2018 02:54
-
-
Save tshirtman/18e64fb786c8aa1a959295cabc59c626 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build with | |
# docker build -f Dockerfile.buildozer -t buildozer . | |
# use the produced image with | |
# docker run -v your_project_dir:/root/build buildozer | |
# at the end of the run, the build directory in your project should contain the apk | |
# you can use the /root/.buildozer/ volume to cache your distributions (first usage may be longer) | |
FROM ubuntu:latest | |
RUN dpkg --add-architecture i386 &&\ | |
apt-get update &&\ | |
apt-get install -y \ | |
wget \ | |
build-essential \ | |
ccache \ | |
git \ | |
libncurses5:i386 \ | |
libstdc++6:i386 \ | |
libgtk2.0-0:i386 \ | |
libpangox-1.0-0:i386 \ | |
libpangoxft-1.0-0:i386 \ | |
libidn11:i386 \ | |
python2.7 \ | |
python2.7-dev \ | |
python-pip \ | |
openjdk-8-jdk \ | |
unzip \ | |
zlib1g-dev \ | |
zlib1g:i386 &&\ | |
pip install --upgrade cython buildozer | |
ADD test_project /root/test_project/ | |
RUN cd /root/test_project && \ | |
echo y | buildozer init && \ | |
echo y | buildozer -v android debug &&\ | |
mkdir /root/build/ | |
VOLUME ["/root/.buildozer", "/root/build"] | |
WORKDIR "/root/build" | |
ENTRYPOINT ["buildozer", "android", "debug"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place in test_project/main.py aside to the dockerfile before building | |
from kivy.app import App | |
from kivy.uix.label import Label | |
__version__ = '0.1' | |
class TestApp(App): | |
def build(self): | |
return Label(text='it works!') | |
if __name__ == '__main__': | |
TestApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment