How to Create Docker Configuration File on Windows Containers

In this article, I’ll show you how to create a Docker configuration file on Windows Server 2016 running Windows Containers.

By default, the configuration file doesn’t exist and only when Installed the settings on the file takes over the current configuration.

The configuration Is a .JSON file and we only need to add to it the configuration we want to use.

To get started, we have to stop the Docker Service and stop all containers.

Stop-Service docker

Once stopped, I’ll create the configuration file in the following path c:\ProgramData\docker\config

I’m creating the file using PowerShell.

new-item -Type File c:\ProgramData\docker\config\daemon.json

Once created you will see the file

Next, I’ll add the configuration below which will allow remote management machines to manage my docker host on port 2375

{

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

}

Next, I’ll start docker and I’m done.

Start-Service docker

Leave a Reply