With Windows Server 2016, Microsoft introduces the new feature called Windows Containers. Containers wrap software up within in a complete file system that contains everything it needs to run: code, runtime, system tools and system libraries. This guarantees that it will always run the same, regardless of the environment it is running within.
In October 2014, Microsoft Corp and Docker announced a strategic partnership to bring the agility, portability, and security benefits of the Docker platform to Windows Server.
Installing Windows Containers feature:
Let’s start by installing the Windows Containers feature on the container host:
1 2 3 4 5 6 |
PS > Install-WindowsFeature Containers Success Restart Needed Exit Code Feature Result ------- -------------- --------- -------------- True Yes SuccessRest... {Containers} WARNING: You must restart this server to finish the installation process. |
Installing Docker
Now, you can deploy Docker from the PowerShell Gallery. First, install the provider:
1 |
PS > Install-Module -Name DockerMsftProvider -Repository PSGallery -Force |
Next, install Docker:
1 |
PS > Install-Package -Name docker -ProviderName DockerMsftProvider |
Once installed, the service can be started:
1 2 |
PS > Start-Service Docker WARNING: Waiting for service 'Docker Engine (Docker)' to start... |
After this step, you should be able to work with Docker on your machine. You can type docker info to check that all is good.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
PS C:\> docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 1.14.0-dev Storage Driver: windowsfilter Windows: Logging Driver: json-file Plugins: Volume: local Network: l2bridge l2tunnel nat null overlay transparent Swarm: inactive Default Isolation: process Kernel Version: 10.0 14393 (14393.0.amd64fre.rs1_release.160715-1616) Operating System: Windows Server 2016 Datacenter OSType: windows Architecture: x86_64 CPUs: 1 Total Memory: 1.933 GiB Name: SRV1 ID: VB3B:IGYN:GEFL:6ML7:OQJM:GMCJ:HDNU:Z57W:SWYI:Z2I3:WZKG:O2L4 Docker Root Dir: C:\ProgramData\docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false |
Done! Docker is installed on your Windows Server 2016.
Thanks for reading! You can follow me on Twitter @PrigentNico