Background
I was using a laptop with openSUSE Leap 15.1 to develop a Qt app. I upgraded to openSUSE Tumbleweed. Now I realize that library versions which my app is dependent upon are not available for Tumbleweed. Now I have these options:
- Reinstall openSUSE Leap 15.1 (or maybe 15.2?)
- Set up a development environment with some Docker images
- Set up a development environment with a virtual machine
- Unavailable dependencies: grab their binary packages directly and install them manually on openSUSE Tumbleweed
Question
I’m curious about 2nd option i.e. Docker.
I know how to use Docker to deploy the app. You set up the development container with all the dependencies and run some deployment scripts with it.
However, I don’t know:
Is it possible to set up Docker containers in a way that Qt Creator debugger can be used for development? If I use Docker, would I be able to step through the code with Qt Creator debugger?
Plan
Is this scenario possible?
- Pull an openSUSE Leap 15.1 Docker image
- Set up a bindmount volume that links the
/usr/lib64/
directory from inside the container to the~/leaplib
directory on the host machine. It means~/leaplib:/usr/lib64/
- Do the same for development headers i.e.
~/leapinclude:/usr/include/
- Bindmount procedure is explained here
- Install all the Qt project dependencies on the openSUSE Leap 15.1 container
- Therefore, all dependency libraries and header files would be installed inside the container bindmount volumes
- Inside Qt Creator project on the host machine, add
~/leaplib
to library path - Inside Qt Creator project on the host machine, add
~/leapinclude
to include path - The Qt project source code repository is of course on the host machine
- Use Qt Creator to open project repository source code
- You should be able to develop and debug the code with Qt Creator debugger, right?
The above plan is not tested yet. Not sure if it would work. Any idea? Am I missing something?