8 Commits

Author SHA1 Message Date
50cb9d570d only add as a pr requirement
Some checks failed
Build Validation / build (pull_request) Successful in 35m20s
Build and Push Docker Image / build-and-push (push) Failing after 4s
2025-05-28 16:11:27 +02:00
5f9e3eadf1 add basic build step to validate DockerFile
Some checks failed
Build Validation / build (push) Has been cancelled
Build Validation / build (pull_request) Has been cancelled
2025-05-28 16:10:06 +02:00
ce550c9b92 Move Dockerfile to repo root + remove devcontainer 2025-05-28 16:04:19 +02:00
16e6208134 Update dockerfile and devcontainer.json to execute poststart.sh and forward x11 2025-05-28 16:00:48 +02:00
8941d84bc8 updated dockerfile to reduce filesize to 2 Gb + updated pipeline to use local ip for runners to skip cloudflare limitations 2025-04-07 19:34:32 +02:00
39b594b0b2 Update .gitea/workflows/build-container.yaml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6s
test local ip to push without uploading limits
2025-04-02 18:14:59 +00:00
e63985083c add automatic build of devcontainer if it changes
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 49m18s
2025-03-31 22:08:50 +02:00
bb0450ad69 Added devcontainer config and docker with development environment 2025-03-31 21:48:22 +02:00
4 changed files with 150 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
name: Build and Push Docker Image
on:
push:
branches:
- 'main'
paths:
- '**/Dockerfile'
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log into Gitea Container Registry
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${{ secrets.LOCAL_INSTANCE_IP }} -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build Docker image
run: |
docker build -t ${{ secrets.LOCAL_INSTANCE_IP }}/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest -f Dockerfile .
- name: Push Docker image
run: |
docker push ${{ secrets.LOCAL_INSTANCE_IP }}/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest

View File

@@ -0,0 +1,18 @@
# .gitea/workflows/build.yml
name: Build Validation
on:
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker Image
run: |
docker build -t ${{ secrets.LOCAL_INSTANCE_IP }}/${{ secrets.DOCKER_USERNAME }}/devcontainer:latest -f Dockerfile .

103
Dockerfile Normal file
View File

@@ -0,0 +1,103 @@
# Use the official Alpine Linux image
FROM alpine:3.21
# Install dependencies for Android SDK and Qt build tools
RUN apk update && \
apk add --no-cache \
bash \
build-base \
cmake \
git \
curl \
unzip \
openjdk17 \
libx11 \
libxcomposite \
libxrandr \
libxcursor \
libxi \
libx11 \
libx11-dev \
libxcb \
libxcb-dev \
libxkbcommon \
libxkbcommon-dev \
xcb-util-dev \
xcb-util-image-dev \
xcb-util-keysyms-dev \
xcb-util-renderutil-dev \
xcb-util-wm-dev \
xcb-util-cursor-dev \
mesa-dev \
freetype-dev \
fontconfig-dev \
dbus-dev \
libusb
ENV QT_VERSION=6.8.0
ENV QT_INSTALL_PATH=/opt/qt-${QT_VERSION}
# Download and install Qt 6.8.0 from the official Qt website
RUN mkdir -p ${QT_INSTALL_PATH} && \
cd ${QT_INSTALL_PATH} && \
wget https://download.qt.io/archive/qt/6.8/6.8.0/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \
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 \
-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 && \
rm -rf ${QT_INSTALL_PATH}/qt-everywhere-src-${QT_VERSION}
ENV ANDROID_SDK_ROOT=/opt/android-sdk
ENV PATH="${QT_INSTALL_PATH}/bin:${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin:${ANDROID_SDK_ROOT}/platform-tools:${ANDROID_SDK_ROOT}/emulator:${ANDROID_SDK_ROOT}/tools:${ANDROID_SDK_ROOT}/tools/bin:${JAVA_HOME}/bin:$PATH"
# Install Android SDK Command Line Tools
RUN mkdir -p ${ANDROID_SDK_ROOT}/cmdline-tools && \
curl -o sdk-tools-linux.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip && \
unzip sdk-tools-linux.zip -d ${ANDROID_SDK_ROOT}/cmdline-tools && \
rm sdk-tools-linux.zip && \
mv ${ANDROID_SDK_ROOT}/cmdline-tools/cmdline-tools ${ANDROID_SDK_ROOT}/cmdline-tools/latest
# Install required Android SDK components
RUN yes | sdkmanager --licenses && \
sdkmanager --update && \
sdkmanager "platform-tools" "platforms;android-33" "build-tools;33.0.2"
# Verify SDK installation
RUN sdkmanager --list
# Set working directory
WORKDIR /workspace
# Set environment variables for Qt and Android SDK
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk
ENV QT_QPA_PLATFORM=xcb
ENV QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/qt6/plugins/platforms
ENV LD_LIBRARY_PATH=/opt/qt-6.8.0
ENV QT_DEBUG_PLUGINS=1
# Expose ADB debugging port
EXPOSE 5555
# Start bash as the default command
CMD ["/bin/bash"]

View File

@@ -1,6 +1,6 @@
MIT License 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: 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: