Sign inSign up

dalogik/qt-docker

By dalogik

•Updated 4 days ago

Easy to use images to build QT applications

Image
Developer tools
1

2.5K

dalogik/qt-docker repository overview

⁠Qt Development Images (Ubuntu)

This repository contains Linux-based Docker images (Ubuntu) pre-installed with the Qt framework, including all standard plugins and essential build tools. These images are specifically designed to streamline CI/CD workflows and facilitate cross-platform builds for Linux and Windows.

⁠Key Features

  • CI-Ready: Includes essential utilities like git, curl, and ca-certificates for seamless integration with GitHub Actions, GitLab CI, and Jenkins.
  • Pre-configured: Comes ready-to-use with make, cmake, and necessary Qt modules.
  • Cross-Compilation: Built-in support for targeting Windows (via MinGW) or Linux from a Linux-based container.

⁠Tagging Format

Images follow a standardized naming convention:

qt<Qt version>-<OS version>-<compiler>[-<date of build>]

  • Qt version: The version of the Qt framework (e.g., 6.10.0).
  • OS version: Target operating system (linux64 or win64).
  • Compiler: The toolchain used (gcc for Linux or mingw for Windows).
  • Date of build: (Optional) Suffix used for specific image iterations.

⁠Quick Start (Windows target)

⁠1. Pull an image

To pull the image for Qt 6.10.0 targeting Windows:

docker pull dalogik/qt-docker:qt6.10.0-win64-mingw
⁠2. Build your project

You can run the container to build your project. For example, if your project uses a Qt .pro file:

docker run --rm -it -v /path/to/your/project:/source \
    dalogik/qt-docker:qt6.10.0-win64-mingw \
    bash -c 'mkdir -p /source/build && cd /source/build && qmake .. && mingw32-make && windeployqt --dir deploy release/*.exe'

⁠GitHub Actions Integration (Windows target)

Automate your qmake builds by adding this to your GitHub workflow:

jobs:
  build:
    runs-on: ubuntu-latest
    container: dalogik/qt-docker:qt6.10.0-win64-mingw
    steps:
      - uses: actions/checkout@v7
      - run: |
          mkdir build
          cd build
          qmake ..
          mingw32-make
          windeployqt --dir deploy release/*.exe

Automate your CMake builds with configured install step by adding this to your GitHub workflow:

jobs:
  build:
    runs-on: ubuntu-latest
    container: dalogik/qt-docker:qt6.10.0-win64-mingw
    steps:
      - uses: actions/checkout@v7
      - run: |
          # Create a directory Wine can own
          mkdir -p /tmp/wineprefix
          export WINEPREFIX=/tmp/wineprefix
          # Build
          cmake -B build -G Ninja
          cmake --build build --config Release
          cmake --install build --config Release --prefix $GITHUB_WORKSPACE/deployment_dir

⁠Available images

Qt versionLinuxWindows
6.8.0✅✅
6.9.0✅✅
6.10.0✅✅
6.11.0✅✅
6.12.0✅❌

⁠Resources

Tag summary

Content type

Image

Digest

sha256:fda126c2b…

Size

970.9 MB

Last updated

4 days ago

docker pull dalogik/qt-docker:qt6.11.2-win64-mingw