Download presentation
Presentation is loading. Please wait.
1
CDT Build/Run/Debug in Container
Jeff Johnston
2
Goals Build/Run/Debug C/C++ applications in Docker Containers
Extend previous Mgd Build Run/Debug Container support Make support optional via CDT Docker Launch feature Add support to existing projects via Build Settings - No new project types required Tie Build in Container support to Configuration Support indexing on local host Start with current Managed Build
3
Design Override Command Launching
Run commands via Linux Tools Docker Tooling Mount project and working directories Make source available to Container tools In the case of remote daemon, copy and copy-back changes Copy header files from include path back to host One-time cost (Docker Image headers don't change) Modify include paths for indexer to cached location Indexer runs locally and uses cached headers from Image
4
Container Settings Tab
5
Container Settings Enable Container build (default is off)
Use special launcher that uses Docker Tooling Choose Docker Connection and Image to use Docker daemon must be running and Connections opened Docker Image must have needed tools installed Specify additional directories to mount in Container Project, Working directory, and Related projects are mounted by default Include paths from build used to copy back headers
6
Cached Header Management
7
Setting up Docker Image
Can use Dockerfile build or Container commit To use Container commit, start a base Image (e.g. f26) with /bin/sh command and then start installing needed packages e.g. dnf install gcc gcc-c++ binutils make gdb-gdbserver Use Docker Tooling to commit Container as Image Use this new image for your build/run/debug in Container work
8
Debugging Currently runs gdbserver in Container
Older versions of host gdb may not work (e.g. gdb 6.x) Gdb works (2013) On Non-Linux need gdb to support Linux ABI For example, for Windows, configure gdb: ./configure --host=x86_64-w64-mingw32 --disable-binutils --disable- ld --disable-gold --disable-gas --disable-sim --disable-gprof –enable- targets=x86_64-unknown-linux-gnu Can specify gdb that handles multiple targets
9
Current Status Initial ManagedBuild support checked into master branch as of Oct 22/2017 Will be part of Oxgyen.2 release of CDT Yocto team helping out to support new build model Docker Tooling updates-docker-nightly-oxygen will contain latest fixes for Oxygen
10
Further Information https://www.docker.com/whatisdocker/
rticle1.php (Linux Tools mailing list) (CDT mailing list)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.