C/C++ Project Properties, Build, Settings, Container Settings
Use the Container Settings properties tab to specify options for building the project in a Docker Container. This properties tab is provided with the optional Docker C/C++ Launch feature. By default, project configurations will build locally, however, if you want to have a particular configuration build the project in a Container, use the enablement check-box. After enabling building in a Container, you need to select an active Docker Connection and a down-loaded Image in that Connection to run the build in. The Image must have whatever tools are necessary to perform the build already installed. Docker Images will be linux-based so the build will use linux appropriate toolsets and create a linux-compatible executable.
By default, the C/C++ project and all dependent project contents will be mounted into the Container where the build is occurring. This allows the build to find project source and header files. If additional host directories are needed to build the project (e.g. a local header file directory that is not part of an installed package in the Docker Image), such directories can be added to the Data Volumes table and they will be mounted in the Container before the build occurs. If the Docker daemon is running locally, this will be a simple mount. If the Docker daemon is remote, mounting will involve automatically copying the directory contents over to the Container since system mounting cannot occur across machines.
To accommodate indexing, build-specs discovery will be performed in the Docker Container. Directories found by specs detection will be copied locally for use by the indexer. This copying process also occurs for any header file directories discovered while building. The header files are stored within the workspace and are only uploaded once per Docker Image. These header files can be removed from the Preferences page if, for example, the project no longer needs to build/index for that particular Docker Image.
|Configuration||Click here for a description.|
|Manage Configurations...||Click here for a description.|
|Build inside Docker Image (check-box)||Enables the build to occur inside a Container.|
|Connection||Pull-down that contains a list of known Docker daemon connections to run the build in if enablement button is checked.|
|Image||Pull-down that contains Docker Image names to use to create the Container the build will run in. This list is enabled by a Docker Connection selection and the enablement check-box.|
|Data Volumes||Optional list of directories to mount into the Container prior to building. By default, the C/C++ project and any refererenced projects are mounted automatically in the Container. Directories can be added, edited, or removed using the buttons to the right of the list.|
|Add...||Button to bring up the Data Volume dialog for specifying a data volume to mount in the Docker Container. This usually involves selecting a directory from the local system. Once finished, the mount will be shown in the Data Volumes list.|
|Edit...||Button to edit the currently selected data volume in the Data Volumes list.|
|Remove||Button to remove the currently selected data volume(s) in the Data Volumes list.|
Available for: CDT projects.
- Project Properties, Resource page
- Project Properties, Builders page
- Project Properties, common C/C++ Configurations handling
- Project Properties, C/C++ Build category
- Project Properties, C/C++ General category
- C/C++ Project Properties, Project References page
- C/C++ Project Properties, Run/Debug Settings page