Fat: add Dockerfile
This commit is contained in:
parent
6a4c42bf53
commit
fc81c2602a
1 changed files with 39 additions and 0 deletions
39
Dockerfile
Normal file
39
Dockerfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
FROM ubuntu:22.04
|
||||
|
||||
ARG QT_EVERYWHERE_URL="https://download.qt.io/archive/qt/5.15/5.15.5/single/qt-everywhere-opensource-src-5.15.5.tar.xz"
|
||||
ARG QT_VERSION_FAMILY="5.15"
|
||||
ARG QT_VERSION="5.15.5"
|
||||
ARG ANDROID_PLATFORM_VERSION="android-29"
|
||||
ARG ANDROID_BUILDTOOLS_VERSION="29.0.2"
|
||||
ARG ANDROID_NDK_VERSION="21.3.6528147"
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
RUN export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 && \
|
||||
export PATH=$JAVA_HOME/bin:$PATH && \
|
||||
export QT_EVERYWHERE_URL="https://download.qt.io/archive/qt/${QT_VERSION_FAMILY}/${QT_VERSION}/single/qt-everywhere-opensource-src-${QT_VERSION}.tar.xz" && \
|
||||
export ANDROID_CLI_TOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip" && \
|
||||
apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y wget openjdk-8-jdk tar xz-utils unzip && \
|
||||
echo "**** download Qt and android-cli-tools ****" && \
|
||||
wget -O qt-everywhere.tar.xz ${QT_EVERYWHERE_URL} && \
|
||||
wget -O android-cli-tools.zip ${ANDROID_CLI_TOOLS_URL} && \
|
||||
echo "**** extract Qt and android-cli-tools ****" && \
|
||||
mkdir qt-everywhere && \
|
||||
tar -xf qt-everywhere.tar.xz --strip-components=1 -C ./qt-everywhere && \
|
||||
unzip android-cli-tools.zip && \
|
||||
echo "**** install android sdk ****" && \
|
||||
echo "y" | ./cmdline-tools/bin/sdkmanager --sdk_root=/usr/lib/android-sdk --install "platform-tools" "platforms;${ANDROID_PLATFORM_VERSION}" "build-tools;${ANDROID_BUILDTOOLS_VERSION}" "ndk;${ANDROID_NDK_VERSION}" && \
|
||||
echo "**** clean up qt Qt and android-cli ****" && \
|
||||
rm -rf qt-everywhere.tar.xz android-cli-tools.zip cmdline-tools
|
||||
|
||||
RUN dpkg --add-architecture i386 && \
|
||||
apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 make g++
|
||||
|
||||
RUN echo "**** build Qt ****" && \
|
||||
mkdir build-qt && cd build-qt && \
|
||||
/workspace/qt-everywhere/configure -xplatform android-clang -prefix /usr/lib/qt -disable-rpath -nomake tests -nomake examples -android-ndk /usr/lib/android-sdk/ndk/${ANDROID_NDK_VERSION} -android-sdk /usr/lib/android-sdk -no-warnings-are-errors && \
|
||||
echo "**** done ****"
|
||||
|
||||
entrypoint ["bash"]
|
Loading…
Reference in a new issue