2021-08-21 17:36:38 +02:00
|
|
|
FROM ubuntu:20.04
|
2021-08-21 11:30:12 +02:00
|
|
|
|
|
|
|
RUN export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
|
|
|
RUN dpkg --add-architecture i386
|
|
|
|
RUN apt-get -y update && apt-get -y install curl ca-certificates software-properties-common gpg-agent wget
|
|
|
|
RUN add-apt-repository ppa:deadsnakes/ppa -y
|
2021-08-21 17:36:38 +02:00
|
|
|
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install autoconf autogen automake \
|
|
|
|
libtool libffi-dev build-essential python3.9 python3.9-dev python3.9-venv ccache git \
|
|
|
|
libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 \
|
|
|
|
libidn11:i386 openjdk-8-jdk unzip zlib1g-dev zlib1g:i386 m4 libc6-dev-i386 gawk
|
2021-08-21 11:30:12 +02:00
|
|
|
|
|
|
|
RUN rm /usr/bin/python3 && ln -s /usr/bin/python3.9 /usr/bin/python3
|
2021-08-21 17:36:38 +02:00
|
|
|
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3.9 /usr/bin/python
|
|
|
|
RUN wget https://bootstrap.pypa.io/pip/get-pip.py && python3 get-pip.py
|
|
|
|
RUN pip install --upgrade cython==0.29.24 setuptools zipp importlib-resources importlib-metadata virtualenv appdirs sh colorama\>=0.3.3 jinja2 six pep517\<0.7.0 toml
|
2021-08-21 11:30:12 +02:00
|
|
|
|
|
|
|
RUN mkdir -p cd ~/.buildozer/android/platform/
|
|
|
|
|
|
|
|
RUN wget 'https://dl.google.com/android/android-sdk_r23-linux.tgz' -P ~/.buildozer/android/platform/ && \
|
|
|
|
wget 'https://dl.google.com/android/repository/platform-28_r06.zip' -P ~/.buildozer/android/platform/ && \
|
|
|
|
wget 'https://dl.google.com/android/repository/build-tools_r28.0.3-linux.zip' -P ~/.buildozer/android/platform/ && \
|
2021-08-21 19:41:22 +02:00
|
|
|
wget 'https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip' -P ~/.buildozer/android/platform
|
|
|
|
|
|
|
|
RUN tar -xvf ~/.buildozer/android/platform/android-sdk_r23-linux.tgz -C ~/.buildozer/android/platform/ && \
|
2021-08-21 17:36:38 +02:00
|
|
|
mv ~/.buildozer/android/platform/android-sdk-linux ~/.buildozer/android/platform/android-sdk && \
|
|
|
|
unzip ~/.buildozer/android/platform/platform-28_r06.zip -d ~/.buildozer/android/platform/android-sdk/platforms && \
|
2022-12-09 20:47:05 +01:00
|
|
|
# android 9 (pie) comes with api level 28.
|
2021-08-21 17:36:38 +02:00
|
|
|
mv ~/.buildozer/android/platform/android-sdk/platforms/android-9 ~/.buildozer/android/platform/android-sdk/platforms/android-28 && \
|
|
|
|
mkdir -p ~/.buildozer/android/platform/android-sdk/build-tools && \
|
|
|
|
unzip ~/.buildozer/android/platform/build-tools_r28.0.3-linux.zip -d ~/.buildozer/android/platform/android-sdk/build-tools && \
|
|
|
|
mv ~/.buildozer/android/platform/android-sdk/build-tools/android-9 ~/.buildozer/android/platform/android-sdk/build-tools/28.0.3 && \
|
2021-08-21 21:10:41 +02:00
|
|
|
mkdir -p ~/.buildozer/android/platform/android-sdk/cmdline-tools && \
|
|
|
|
unzip ~/.buildozer/android/platform/commandlinetools-linux-7583922_latest.zip -d ~/.buildozer/android/platform/android-sdk/cmdline-tools && \
|
|
|
|
mv ~/.buildozer/android/platform/android-sdk/cmdline-tools/cmdline-tools ~/.buildozer/android/platform/android-sdk/cmdline-tools/5.0 && \
|
|
|
|
cp -Rf ~/.buildozer/android/platform/android-sdk/cmdline-tools/5.0/* ~/.buildozer/android/platform/android-sdk/tools
|
2021-08-21 19:41:22 +02:00
|
|
|
|
|
|
|
RUN rm ~/.buildozer/android/platform/android-sdk_r23-linux.tgz && \
|
2021-08-21 11:30:12 +02:00
|
|
|
rm ~/.buildozer/android/platform/platform-28_r06.zip && \
|
2021-08-21 19:41:22 +02:00
|
|
|
rm ~/.buildozer/android/platform/build-tools_r28.0.3-linux.zip && \
|
|
|
|
rm ~/.buildozer/android/platform/commandlinetools-linux-7583922_latest.zip
|
2021-08-21 11:30:12 +02:00
|
|
|
|
2021-08-21 17:36:38 +02:00
|
|
|
RUN mkdir -p ~/.buildozer/android/platform/android-sdk/licenses && \
|
|
|
|
echo $'\n8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee' > ~/.buildozer/android/platform/android-sdk/licenses/android-sdk-license
|
2021-08-21 11:30:12 +02:00
|
|
|
|
2021-08-21 21:10:41 +02:00
|
|
|
RUN git clone https://github.com/lbryio/buildozer.git
|
|
|
|
RUN cd buildozer && python setup.py install && cd ..
|
|
|
|
|
2021-08-21 11:30:12 +02:00
|
|
|
CMD ["/bin/bash"]
|
2022-12-09 20:47:05 +01:00
|
|
|
|
|
|
|
# result is
|
|
|
|
# ./root/.buildozer/android/platform/android-sdk/[build-tools,cmdline-tools,licenses,platforms,tools]
|
|
|
|
# ...build-tools/28.0.3/
|
|
|
|
# ...cmdline-tools/5.0/[bin,lib,source.properties]
|
|
|
|
# ...platforms/android-28/[]
|
|
|
|
# ...tools/[]
|