Skip to content

arBmind/qtcreator-containers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker images for QtCreator

This project builds Docker images with QtCreator and various compilers used to build and debug C++ and Gui applications using WSL and Docker.

Image (latest versions) Size
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)

Usage

Prerequiste: X server (Win11 or VcXsrv)

docker run -it \
    -e DISPLAY=host.docker.internal:0 \
    --mount src="$(pwd)",target=/build,type=bind \
    arbmind/qtcreator-gcc-qt:latest \
    qtcreator myproject.qbs
docker run -it \
    -e DISPLAY=host.docker.internal:0 \
    --mount src="$(pwd)",target=/build,type=bind \
    arbmind/qtcreator-clang-libstdcpp-qt:latest \
    qtcreator myproject.qbs

Description:

  • define the display variable to use Docker
  • mount the current directory to the /build folder
  • use the qtcreator-clang-qt image in the latest variant
  • start the qtcreator with myproject.qbs

If you want to do more work on the project, we recommend to use a docker-compose.

version: "3.7"

volumes:
  tmp: # cached builds

services:
  myproject:
    image: arbmind/qtcreator-gcc-qt:latest
    environment:
      - DISPLAY=host.docker.internal:0
    command: qtcreator myproject.qbs
    volumes:
      - ./repository/:/build
      - tmp:/tmp

Details

The Dockerfile is multi staged and has different targets for all the variants. All targets with underscores are meant to be internally only.

Note: The Clang Qt combination is missing because the Qt Company does not publish binaries built for libc++

QtCreator is preconfigured to run Gui applications properly.

To support your development the user is non-root. You may still install extra software with sudo if you need.

About

Docker containers with QtCreator - Ready to develop, build and run Qt Gui applications.

Topics

Resources

Stars

Watchers

Forks