Is it possible to install any version of Visual Studio in a Windows Container on a Windows Server?
The motivation is to use Windows Containers for building software in continuous integration systems, so that the build environment is standardized.
Is it possible to install any version of Visual Studio in a Windows Container on a Windows Server?
The motivation is to use Windows Containers for building software in continuous integration systems, so that the build environment is standardized.
Just for the record MS is not planning support VS inside containers, the best alternative that you have is MsBuild. Some months ago was possible but with the latest version from VS is not possible. Source: vsts-agents
A way to install visual build chain in a windows container could be to use chocolatey package visualstudio2017buildtools.
Starting Dockerfile with something like :
Visual Studio seems to not be supported officially on Core Server, but I agree it would be really nice to be able to do this. Let's try:
(I'm pushing this image into lukaslansky/visualstudio-netwebworkload, use with caution.)
Output of the build is:
So this seems to work! You should play with those
--add
installator arguments to specify what components you need precisely for your build, they correspond to workloads and components you see in the GUI. See the documentation.Your best bet at this point is to use Visual Studio Build Tools.
Windows Containers do not currently include GUI apps. The limitation is on Microsoft, not on Docker.
For example try something simple like running Notepad (in Windows Server Core container). The process is launched but no GUI shows up.
It does make sense to run IDE inside a container if you want to make it easy to setup the work environments for developers.
You can run Visual Studio Code inside a container (https://grigio.org/visual_studio_code_docker/) or Eclipse (https://rgrunber.wordpress.com/2016/01/26/eclipse-inside-a-docker-container/). Visual studio should work rather similar