Duncan Gravill
Duncan Gravill

Reputation: 4672

Visual C++ for Linux Development + Docker

I would like to develop a Linux C++ app by building and debugging in a Docker container. I intend to use Visual C++ for Linux Development to remote debug into the container. However this Visual Studio extension was originally intended for use with a Linux VM, Linux development and Docker are new to me, and I'm a little stuck on the basics of setting it up.

I have created an ubuntu:14.04 docker container and I have installed the Visual C++ for Linux dependencies in the container, namely openssh-server, g++, gdb and gdbserver. I have committed the container, creating an image to work with. I think I now need to run the container opening up a port so that I can connect to the container from Visual Studio.

How is this done? Does the container need to be further set up so that there is some kind of handler to handle communication on the port which is going to be opened? For instance does Bash need to be assigned to handle communication over the port? Or does one of the dependencies, perhaps openssh-server, need to be assigned to handle communication over the port? Or was something set up when I installed the dependencies? If so on which port?

In the Visual C++ for Linux Development instructions it shows that credentials such as Host name, Port, User name, Authentication type, and Password can be provided when connecting to a VM. Naturally Port will be required but will the others be required? If so do these credentials need to be set in the Ubuntu container or discovered somehow? If so how?

Upvotes: 1

Views: 1530

Answers (1)

David
David

Reputation: 1247

you can use this docker image ducatel/visual-studio-linux-build-box with a VM (like in the readme) or with docker for windows

Upvotes: 1

Related Questions