Packaging Containers Using Linux Subsystem for Windows
On March 30, 2016, Microsoft announced the unthinkable: Linux support was coming to Windows. A day before April Fools’ Day, few could believe they would be able to run Linux executables and utilize Bash on Ubuntu, all within Windows 10. More recently, Microsoft has announced support for SUSE and Fedora on Windows.
Since Windows 10’s Anniversary Edition, the Windows Subsystem for Linux can be installed through a single PowerShell command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
It is now easy to create cross-platform Continuous Integration pipelines and build Docker containers of .NET Core, Java, Node.js, and Go solutions directly from Windows.
To set up access from the Linux subsystem Docker client to Docker for Windows, follow this great guide from Tomas Lycken. Once connected, add the Dockerfile to your solution and trigger the usual
docker build step without having to leave Windows.