How to enable Windows Containers

Microsoft support for Windows containers started with Windows Server 2016 and Windows 10 Anniversary edition.

Windows supports two types of containers Native and Hyper-V. They differ in the isolation provided by the Operation System.

The native containers are treated as any other process by the operation system. Hyper-V containers are run under a light weight Virtual Machine. This enables an additional layer of isolation for the containers. The container image format is the same for both type of containers. It is only the run time isolation that is different.

Windows 10 supports only Hyper-V containers. Due to this when we want to build and run containers on Windows we need to enable the following features.

a. Containers

b. Hyper-V

The following images depicts how these features can be enabled from the Windows feature installation UI.

After enabling these features you need to restart the machine.

Setting up secure web site communication in Apache web server

Securing your website is a common requirement these days. You need to get SSL certificate for your domain to secure the communication between the browser and the Web Server. There are many sources like Let’s Encrypt who provide these SSL certificates for free.

If you are setting up SSL certificate using a control panel like VestaCP. The SSL certificate is automatically issued for your domain. But, the users are not automatically redirected from the HTTP to HTTPS URL.

This rule needs to be configured in Apache web server using the .htaccess file. This file is used to enable or disable any additional functionality/features in the Apache Web server.

Adding the following few lines to .htaccess and placing it at the root directory of your domain does this trick. Users will now be automatically redirected to the secure HTTPS URL even when they type unsecure HTTP URL.

 

Please let me know your views on this.

List of scenarios where Docker for Windows can be utilized

Docker platform was built on use cases derived from running large scale services on Linux platform. It is obvious that the scenarios where Linux is most popular is not in the desktop end but on the server side applications. Due to this Docker in specific and Containers in general have been designed and are most apt for the background services like Web API, Web Server etc. which do not have desktop experience.

When the Docker is used in the Windows platform, it addresses only subset of the cases where large scale applications are concerned. Since containers were not designed with the desktop experience in mind it is not suitable for Windows Forms and WPF applications. But, it is well suited for ASP.Net applications (both Web and Web API), WCF services and Console application that do not need user inputs.

Please let me know your views on this.