<div dir="ltr">Hi all,<div><br></div><div>Great that we are talking about the difficulties of building QGIS. I just wanted to also share my way of building QGIS using Distrobox (<a href="https://github.com/89luca89/distrobox">https://github.com/89luca89/distrobox</a>). I have tried local and few containerization methods and VCPKG but I find Distrobox to be easily the fastest and the most stable way.</div><div><br>Here are the steps in a nutshell:</div><div><ol><li>Download Distrobox in any linux distro</li><li>Check the suitable build deps image for your needs in <a href="https://hub.docker.com/u/qgis">https://hub.docker.com/u/qgis</a> . I used <b>qqgis3-build-deps-ubuntu-qt6:latest</b> which contains every dependency needed for building QGIS with QT6 support</li><li>In terminal run:<br><font face="monospace">distrobox create --image <a href="http://docker.io/qgis/qqgis3-build-deps-ubuntu-qt6:latest">docker.io/qgis/qqgis3-build-deps-ubuntu-qt6:latest</a> --additional-packages "qtcreator" qgis-dev</font></li><li>Allow using graphical interface within distrobox by running: <br><font face="monospace">xhost + </font></li><li>Connect to box: <br><font face="monospace">distrobox enter qgis-dev</font></li><li>Start qtcreator (or CLion which is my IDE of choice) in the terminal and start building QGIS normally</li><li>You might want to set -DWITH_INTERNAL_SPATIALINDEX=ON and -DWITH_PDAL=OFF since build dep images do not contain the deps for those.</li><li>QGIS can be started and debugged normally and has access to all your local data just like in the normal local environment and even local (or container) databases can be accessed easily via your computer's ip address (<font face="monospace">ip addr show</font>)</li></ol><div>All the tasks prior to building take about 10 minutes and the development experience is superior to any other method I have tried so far. I can see that .devcontainer folder is in .gitignore so there is at least some developers that are using Devcontainers with QGIS as well, but it would be great if that way could also be officially supported.</div></div><div> </div><div>Cheers,</div><div>Joona</div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">ti 11.11.2025 klo 10.16 Samweli Twesa Mwakisambwe via QGIS-Developer (<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>) kirjoitti:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Tom, <br><br>Here is a suggested alternative approach that I have documented recently <a href="https://samweli.github.io/QGIS-Development-Using-Docker/" target="_blank">https://samweli.github.io/QGIS-Development-Using-Docker</a><br><br>It may address some of the challenges you have mentioned and there is a potential to align both efforts or incorporate improvements from your implementation.<br><br><br>Best, <br>Samweli</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 7, 2025 at 3:45 AM Tom Christian via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org" target="_blank">qgis-developer@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi All,<div><br></div><div>I am interested in learning more about how QGIS developers configure their development environments, and I would like to get some feedback on an alternate approach.<div><br><div>I recently contributed my first changes to QGIS and I found the development environment quite challenging. While the <a href="https://docs.qgis.org/3.40/en/docs/developers_guide/index.html" target="_blank">QGIS Developers Guide</a> contains lots of information I found most of it to be high-level, e.g. how to work with Git, and there was limited information on gathering required dependencies and setting build configurations.<div><br></div><div>Given the number of dependencies, the risk of conflicts with existing packages, and my strong preference to avoid VMs, I thought a containerised build environment was ideal. My work requires frequently switching between projects and environments. I generally cannot let any one project's dependencies pollute the system outside of a Conda environment, a container, or a VM.</div><div><br></div><div>I found the <a href="https://github.com/qgis/QGIS/tree/master/.docker" target="_blank">CI Docker configuration</a> and thought I could use this to build and test QGIS. <span style="color:rgb(0,0,0)">These Dockerfiles should guarantee all required dependencies AND this is the environment that passes or fails CI checks on my changes.</span> Building QGIS using the CI Docker configuration was OK, but CI is not setup for running the build product in a container - meaning changes cannot quickly be manually / visually tested in this way. The project would have to be compiled (with the benefit of mounted ccache) and installed every time the container was started before the application could run. The long Docker commands are not currently scripted outside of GitHub Actions Workflows, and build configurations are provided via matrices, so replicating these processes locally is non-trivial.</div></div><div><br></div><div>I created <a href="https://github.com/sparkgeo/QGIS-Container-Development" target="_blank">this repo</a> to better automate container-based development and testing of QGIS. It contains build / run / test scripts, .env configurations, and Docker Compose overrides to work with the QGIS CI Docker configuration with as few changes as possible. It currently requires a <a href="https://github.com/sparkgeo/QGIS-EOPF/commit/64b6f6568ec24f9a064a24869b3d1fb95a6ae0b1" target="_blank">single small commit</a> in the active QGIS branch to support this approach, which I removed before creating PRs for the main QGIS repo.</div><div><br></div><div>With this approach, building and running a containerised QGIS development build is (in theory) as simple as <font face="Courier New">scripts/run.sh</font>. Tests can be executed with <font face="Courier New">scripts/test.sh</font>.</div><div><br></div></div><div><br></div><div>I have some questions:</div><div><br></div><div>1) are you installing QGIS build dependencies on "bare metal", or perhaps using a VM?</div><div>2) is there a simpler approach than this for containerised builds, runs, and tests?</div><div> 2a) if not, is there any interest in pursuing this or a similar approach to simplify containerised development environments?</div><div><br></div><div><br></div><div>Ultimately I suspect the QGIS project would benefit from lower barriers to entry and the ability to better isolate build dependencies.</div><div><br></div></div></div>_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><br></div><div><br></div>All the Best,<div><br></div><div>Samweli</div></div></div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>