Visual C++ for Linux Development + Docker - linux

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?

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

Related

Discover file references with wrong casing, because of case-sensitive file system

I am developing an application on .net core on my windows machine.
The app is running on a docker container with the microsoft/aspnetcore-build:2.0 image.
Everything seems fine on my computer, even when it is running in the docker container. The problem appears when it is deployed, where it is running on the same image, but on a linux instance.
for example a reference with wrong casing doesnt work.
reference: ´../Components/Car´;
actual filename: car
This will work on Windows, but not on linux.
This is because the linux file system is case-sensitive while the windows is not.
This happens for backend and frontend apps. Is there a way to circumvent this issue or find the issue earlier in the development cycle? Is there a frontend and/or backend developer tool for this stuff?

Edit ASP.NET Core website in Docker container on Windows and run on Ubuntu VPN

I want to create a ASP.NET Core 2.0 website in a docker container and host it on a Linux VPS docker system. I tried creating an ASP.NET Core 2.0 project in Visual Studio, and then publishing it to docker hub. Everything works great, until I want to run that docker image on my Linux environment. I then get an error saying that this image is created for windows or something equivalent. I know I need to create the asp.net project in the Linux environment, then start coding (obviously), but I want to do the coding in for example Visual Studio on my PC, not via PICO or some other ssh-connected editor.
Summarized:
- I wish to run ASP.NET Core 2.0 website on Linux Docker VPS environment.
- I (think I) need to create the project in the Linux environment (I run Windows locally).
- Wish to edit the code in the docker container locally on my Windows environment.
Anyone know how I can achieve this?
Before creating ASP.NET Core 2 website on your windows operating system, right click on the Docker icon in system tray and then click Switch to Linux containers. Once switched to Linux containers, create ASP.NET Core website that you can host on Linux.

Play! Framework shared folder between VM and Host not triggering webhook

I've ran into an awkward issue. I'll try and explain this as best as I can so bare with.
I'm running Play! on a Linux VM (Oracle VirtualBox), with sbt run command in my terminal it works perfectly fine. If I use an IDE on my VM the webhook catches the change and does a reload.
I've shared a folder between my Host (Windows) and my VM (Linux) where my project directory is. I've also extended a port so that I can open my Play! web application on the Windows machine.
On my Windows Host machine I'm running an IDE (IntelliJ) and when I change something on a file, the Play! webhook running on my VM doesn't seem to pick up the changes made, even though it's listening for changes in my shared folder.
Question: Is there some sort of configuration or share folder magic
trick to get my Play! application to pick up the changes made from the
Host machine?
Thanks for reading, any help is appreciated.
inotify does not work on VMWare's shared folder. You might be able to convince SBT's filewatcher to use polling, but that doesn't work really well.

Can I run JetBrains dotCover in a Linux Docker container?

I'm building and running a .NET Core application inside a Linux-based Docker container. I'm having trouble figuring out if dotCover is cross-platform? I want to either...
Install and run dotCover inside the Docker container (that is $ dotcover analyse ...).
Or run some compatible instrumentation during the test step inside the Docker container and send a file back to the host, where I can run dotCover on the file.
Obviously, I'm already using the dotCover "server package". It doesn't indicate that it's cross-platform. So, maybe I'm stuck trying to find another way.
Resurrecting this one more time for the next reader. Jetbrains released a cross-platform console runner.
https://blog.jetbrains.com/dotnet/2019/08/26/cross-platform-dotcover-console-runner-whats-new-dotcover-2019-2/
I don't mean to resurrect an old post, but I'm going to for anyone landing on this from the internet.
Currently no, all of the ReSharper products from JetBrains are not cross platform. Windows is a requirement under the system requirements page.
https://www.jetbrains.com/resharper/download/system_requirements.html
This means that it is not readily available to run in a linux-based container or linux environment.

How to use ec2 instance as personal dev box using intellij as IDE?

I have searched the questions and have not found an answer to this one:
I am developing an existing project (git repo) that runs only on Linux. For the time being I have at my disposal only a windows laptop which I cannot modify. This laptop has Intellij installed and internet access. I cannot, for example, create a Linux VM on this laptop.
Is there a way I can put the project code on an Amazon ec2 Linux instance and build the project on that instance, while viewing and developing the code in Intellij? All compilation and code execution has to be done remotely, on the ec2 Linux instance. I cannot build locally and push from the windows laptop.
2 possible configurations might be:
(1) install intellij on the ec2 instance and x-window in from windows to view the intellij screens;
(2) use the intellij on the Windows laptop and somehow point the intellij to the ec2 instance in order to view, edit, build, and run the project on that instance.
Any ideas are greatly appreciated!
ec2 with enough memory for development is billed / hour. For 32gb RAM it's >$80/month (always online ~450h).
You could use wls 2 under windows. You can install IDEA and use it trough X server like
VcXsrv and access to windows files. It's not the best idea to run full GNOME (even xfce4). Google chrome also works very well
Downsides are:
(still) slow access to drive compared to raw Linux
I cannot configure WSL to access same VPN as in Windows. It simply cuts off internet connection for WSL while I click connect in windows.

Resources