Operations 7 min read

Installing Docker and Docker‑Compose on Windows Server 2016 and Managing Remote Containers

This guide explains how to enable Windows Server 2016 containers, install Docker and Docker‑Compose via PowerShell, create custom Docker images, export and import them, and configure a remote Docker daemon to run containers and compose files from another machine.

DevOps
DevOps
DevOps
Installing Docker and Docker‑Compose on Windows Server 2016 and Managing Remote Containers

When Windows Server 2016 adds support for containers, you must still install the Docker module to use Docker technology; the OS provides only the container feature, not the Docker engine.

First update all Windows Server 2016 patches, then open an elevated PowerShell session and install the DockerMsftProvider package with Install-Module -Name DockerMsftProvider -Repository PSGallery -Force . After the provider is available, install Docker itself using Install-Package -Name docker -ProviderName DockerMsftProvider and later update it with Install-Package -Name Docker -ProviderName DockerMsftProvider -Update -Force . Verify the installation by running docker info .

To use Docker‑Compose, download the Windows executable from the official releases page, for example:

Invoke-WebRequest "https://github.com/docker/compose/releases/download/1.14.0/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\docker\docker-compose.exe

Because the Docker‑Compose command is not included by default, the downloaded docker-compose-Windows-x86_64.exe must be placed in the system path.

Creating a custom Docker image can be done by running a container, customizing it, and then committing the changes. For example, start a SQL Server container:

docker run -it --name SQLTest -d -p 14331:1433 -e sa_password=XXXXX -e ACCEPT_EULA=Y -v c:\DB\:C:\DB\ microsoft/mssql-server-windows-express:2016-sp1

After configuring the database, stop the container with docker stop SQLTest and commit it to a new image:

docker commit Container_ID microsoft/mssql-server-windows-express:SQLTest

Export the image for transport:

docker save -o "c:\image\SQLTest.tar" microsoft/mssql-server-windows-express:SQLTest

Import the image on another host with docker load (the command itself is not shown but implied).

To run Docker commands on a remote Windows Server, edit the daemon.json file to expose the TCP listener:

"hosts": ["tcp://0.0.0.0:2375", "npipe://"]

Open port 2375 in the remote firewall, restart the Docker service ( Restart-Service docker ), and test the connection with docker -H Remote_IP:2375 info . Finally, execute a remote compose file:

docker-compose -H Remote_IP -f docker-compose.yml up

This sequence enables you to manage containers, build custom images, and orchestrate services on Windows Server 2016 from another machine.

Author: Edward Kuo – a veteran R&D and DevOps practitioner sharing practical infrastructure knowledge.

DockerContainersDocker-ComposeRemote ExecutionImage ManagementPowerShellWindows Server 2016
DevOps
Written by

DevOps

Share premium content and events on trends, applications, and practices in development efficiency, AI and related technologies. The IDCF International DevOps Coach Federation trains end‑to‑end development‑efficiency talent, linking high‑performance organizations and individuals to achieve excellence.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.