Build on Docker devices

In addition to building applications for Docker, you can use the toolchain in Docker to build the applications in Docker.

Note: Enable the Docker plugin to use it.

To build applications on a Docker device:

  1. Go to Preferences > Devices > Devices, and then select Add to add a Docker device.
  2. Go to Preferences > CMake > Tools, and then select Add.
  3. In Path, select Remote in the dropdown menu in Browse (Choose on macOS) to add the path to the CMake executable on the Docker device.
  4. Go to Preferences > Kits > Qt Versions, and then press Shift and click the Add button to add the Qt version on the Docker device.
  5. Go to Preferences > Kits > Compilers, and then select the compiler type in Add.
  6. In C compiler path, select Remote in the dropdown menu in Browse (Choose on macOS) to add the path to the compiler on the Docker device.
  7. Go to Preferences > Kits to add a kit for building on the device.
  8. Select the device, CMake tool, Qt version, and compiler that you added above.
  9. In Run device type and Build device, select Docker device.
  10. To specify build settings:
    1. Open a project for an application you want to develop for the device.
    2. Select Projects > Build & Run to activate the kit that you specified above.
  11. Select Run to specify run settings. Usually, you can use the default settings.

    When you run the project, Qt Creator deploys the application as specified by the deploy steps.

See also Add CMake tools, Enable and disable plugins, How To: Develop for Docker, and How To: Manage Kits.

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.