Eclipse CDT Build with Docker [message #1871688] |
Fri, 04 October 2024 15:24 |
Bernd Mönnicke Messages: 3 Registered: May 2023 |
Junior Member |
|
|
Hello,
sorry for my many question here, but the search function in the forum doesn't work at the moment in my browser. And I have write it twice. The first post for is missing in the forum.
My problem is the configuration of docker and the project to let run the build in a docker.
My error message is:
16:38:35 **** Build of configuration Default for project test-hello ****
Unable to find Docker connection:build-docker:latest
16:38:35 Build Finished. 0 errors, 0 warnings. (took 25ms)
My setup is the following:
- use two VM's under VirtualBox: a) Windows 10 with Eclipse and Windows tools and b) Debian with Docker
in Windows 10 under VirtualBox VM can't run Docker, it use WSL2 and this is not supported yet
- booth VM's have a second network card with internal network for communication between both
- the source directory is mapped via SMB from the Windows VM to the Debian VM over the internal network interfaces
- the docker image is build correct and I can start a container from booth VM's
- Booth VM's have a ssh connection with ssh keys, so that I doesn't need a login prompt.
Eclipse Configuration:
Docker Explorer
- Connection name: Docker-Machine
- TCP Connection: http://169.254.64.61:2375
Docker Explorer Images
- Image: build-docker:latest
- Container Name: Build-Docker
- Command: /bin/bash
- enable -i and -t
- add data volume: /workspace /home/userX/workspace (/home/userX/workspace is mapped via SMB to the Windows VM)
- configuration used environment variables
Project Properties
- C/C++ Build | Settings | Container Settings:
-> Build inside Docker Image: enable
-> Image: build-docker:latest
- C/C++ Build | Builder Settings
-> Use default build command: disabled
-> Build command: ls
- C/C++ Build | Behavior
-> Build (..): <empty>
With this configuration I will run the ls command when I press CTRL+B in Eclipse for the first test.
With this configuration I can start the Docker and the terminal is open. In this terminal I can insert some commands. It works without problems at the moment.
But the build of the project end in the error.
So I've search in the web for a good Howto or description, but i have only found only partial information but not complete.
Now I have more question about the configuration in Eclipse:
- What is the correct configuration of the Docker Image Run (flags, command, ..) for this?
- What means "Entrypoint" in the Docker Image Run configuration?
- How can I start the Docker with a defined user?
- What is the format of the authentication file and for what is this used?
- The configuration Project Properties | Container Settings | Connection is not saved. Why?
- How can I configure that the Docker goes into the correct directory where the project is saved to start the make, but with a other place of the workspace directory (Windows :\workspace Docker: /workspace)?
- How can I stop/break the running build in eclipse?
- How become I the compiler standard includes to the Eclipse in Windows VM? I have read that must copy, but it is not describe how.
- Is it good to get the container a name? Or it is better to let this empty?
- Where is the docker explorer configuration from Eclipse saved? What did I need to save it in the version control to reproduce this?
- Can used more user the same Docker/Container or must every body make his own Container?
I hope that I become good hints to configure it.
Best regards,
Bernd
|
|
|
Powered by
FUDForum. Page generated in 0.04043 seconds