From 548753a5f5d3ce81d3ab50ef11ce0f19ef6e0596 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Tue, 26 Jul 2022 23:38:57 +0200 Subject: [PATCH] Feat: Put everything into one layer to (hopefully save) some space --- Dockerfile | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4da2781..e6a3bf8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,36 +13,35 @@ 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" && \ + dpkg --add-architecture i386 && \ apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y wget openjdk-8-jdk tar xz-utils unzip && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y wget openjdk-8-jdk tar xz-utils unzip libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 make g++ perl python3 git '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev flex bison gperf libicu-dev libxslt-dev ruby libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libxtst-dev libxss-dev libdbus-1-dev libevent-dev libfontconfig1-dev libcap-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libegl1-mesa-dev gperf bison nodejs libasound2-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev && \ + \ 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++ perl python3 git '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev flex bison gperf libicu-dev libxslt-dev ruby libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libxtst-dev libxss-dev libdbus-1-dev libevent-dev libfontconfig1-dev libcap-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libegl1-mesa-dev gperf bison nodejs libasound2-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev - -RUN echo "**** build Qt ****" && \ + \ + echo "**** configure 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 ****" - -RUN echo "**** build and install Qt ****" && \ + /workspace/qt-everywhere/configure -xplatform android-clang -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 "**** build and install Qt ****" && \ cd build-qt && \ make -j8 && \ make install && \ + \ echo "**** clean up ****" && \ - cd /workspace && \ - rm -rf build-qt && \ + cd / && \ + rm -rf workspace && \ echo "**** done ****" +WORKDIR /src entrypoint ["bash"]