From 8941d84bc8c5e0465c5e412d2c6aa1e6a3f0ef5d Mon Sep 17 00:00:00 2001 From: Sil Klaasboer Date: Sun, 6 Apr 2025 22:28:27 +0200 Subject: [PATCH] updated dockerfile to reduce filesize to 2 Gb + updated pipeline to use local ip for runners to skip cloudflare limitations --- .devcontainer/Dockerfile | 23 +++++++++++++++++++++-- .gitea/workflows/build-container.yaml | 14 +++++++------- LICENSE | 2 +- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 660d05e..60e5b19 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -33,9 +33,28 @@ RUN mkdir -p ${QT_INSTALL_PATH} && \ tar -xf qt-everywhere-src-${QT_VERSION}.tar.xz && \ rm qt-everywhere-src-${QT_VERSION}.tar.xz && \ cd qt-everywhere-src-${QT_VERSION} && \ - ./configure -prefix ${QT_INSTALL_PATH} -nomake examples -nomake tests -optimized-qmake && \ + ./configure -prefix ${QT_INSTALL_PATH} \ + -nomake examples \ + -nomake tests \ + -nomake benchmarks \ + -optimized-qmake \ + -commercial -confirm-license \ + -skip qt3d \ + -skip qtdatavis3d \ + -skip qtgamepad \ + -skip qtlottie \ + -skip qtnetworkauth \ + -skip qtquicktimeline \ + -skip qtsensors \ + -skip qtspeech \ + -skip qtwebchannel \ + -skip qtwebengine \ + -skip qtwebglplugin \ + -release \ + -optimize-size && \ make -j$(nproc) && \ - make install + make install && \ + rm -rf ${QT_INSTALL_PATH}/qt-everywhere-src-${QT_VERSION} # Install Android SDK Command Line Tools RUN mkdir -p ${ANDROID_SDK_ROOT}/cmdline-tools && \ diff --git a/.gitea/workflows/build-container.yaml b/.gitea/workflows/build-container.yaml index 0fdba8c..e57a98d 100644 --- a/.gitea/workflows/build-container.yaml +++ b/.gitea/workflows/build-container.yaml @@ -3,7 +3,9 @@ name: Build and Push Docker Image on: push: branches: - - '**' + - 'main' + paths: + - '**/Dockerfile' jobs: build-and-push: @@ -11,18 +13,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Log into Gitea Container Registry run: | - echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${{ vars.LOCAL_INSTANCE_IP }} -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${{ secrets.LOCAL_INSTANCE_IP }} -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin - name: Build Docker image run: | - docker pull hello-world - docker tag hello-world git.silklaasboer.nl/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest - #docker build -t git.silklaasboer.nl/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest -f .devcontainer/Dockerfile . + docker build -t ${{ secrets.LOCAL_INSTANCE_IP }}/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest -f .devcontainer/Dockerfile . - name: Push Docker image run: | - docker push git.silklaasboer.nl/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest \ No newline at end of file + docker push ${{ secrets.LOCAL_INSTANCE_IP }}/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest \ No newline at end of file diff --git a/LICENSE b/LICENSE index d5363bd..395c73e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 silklaasboer +Copyright (c) 2025 silklaasboer & pavankumar bellary Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: