Docker support explain
-
I went through a few posts here talking about using docker image that set up QT + Compiler etc, which only repeats the instructions from the official tutorial
https://doc.qt.io/qtcreator/creator-adding-docker-devices.htmlTo me it is more important to understand how it really works, because I need to write such a dockerfile, but there is almost zero information about what such a docker image can look like and how the whole thing works.
so this is how i imagine it works, QT libs and compiler and ninja etcs are installed in the dockerfile, so when I add the image to the plugin, it will inspect the image and see where all the tools are installed and show the tool set location. And I also need to do the path mounting because it needs to do two volume mapping, one to map the project source code and one place to map the output artifact.
So whenever I click the build button, it will run this ?
docker run -v [/host/volume/location]:[/container/storage] myqtimage cmake paramA paramB
where it will invoke the cmake command in the container, grab the source code from the host machine and use the Kit set up in docker container to generate artifacts in the output folder?
anyone can tell me if my understanding is correct here? and also please share an image file for windows?
-
I went through a few posts here talking about using docker image that set up QT + Compiler etc, which only repeats the instructions from the official tutorial
https://doc.qt.io/qtcreator/creator-adding-docker-devices.htmlTo me it is more important to understand how it really works, because I need to write such a dockerfile, but there is almost zero information about what such a docker image can look like and how the whole thing works.
so this is how i imagine it works, QT libs and compiler and ninja etcs are installed in the dockerfile, so when I add the image to the plugin, it will inspect the image and see where all the tools are installed and show the tool set location. And I also need to do the path mounting because it needs to do two volume mapping, one to map the project source code and one place to map the output artifact.
So whenever I click the build button, it will run this ?
docker run -v [/host/volume/location]:[/container/storage] myqtimage cmake paramA paramB
where it will invoke the cmake command in the container, grab the source code from the host machine and use the Kit set up in docker container to generate artifacts in the output folder?
anyone can tell me if my understanding is correct here? and also please share an image file for windows?
@marc_123 Inside Qt Creator create Docker device and use it as a kit.
When Creator is running, in console executedocker ps -a
and you'll see that there's container running. Started by Qt Creator.
Each build and run command is most likely started bydocker exec
which reference to this newly running container.