Docker Community Forums

Share and learn in the Docker community.

Adding -H option to Windows service. What am i doing wrong?


(Rusticileeroy) #1

So i want to add the -H option to the service running on Windows so it can be managed remotely. The problem i’m having is that when i do so stuff stops working locally. Is this normal?

Before adding -H
docker version
Client:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64
Server:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64

docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 18
Server Version: 1.12.2-cs2-ws-beta
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: nat null overlay
Swarm: pending
NodeID: 5jrhxnpyrfekwbkgmywaj7x33
Is Manager: false
Node Address: 10.250.1.18
Default Isolation: process
Kernel Version: 10.0 14393 (14393.321.amd64fre.rs1_release_inmarket.161004-2338)
Operating System: Windows Server 2016 Datacenter
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 4 GiB
Name: EC2AMAZ-I3HBU1F
ID: 6JSQ:WIFX:QJ25:TM5T:JBOG:CR7M:NSOW:X2AJ:QJXR:PRID:CLE2:6Q67
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

To modify the service i run:

net stop docker

sc config “docker” binPath= ““C:\Program Files\Docker\dockerd.exe” --run-service -H 0.0.0.0:2375”

net start docker

After doing so i can successfully connect remotely and run:

docker images

(for example)
But running the same command locally gives me:

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/images/json: open //./pipe/docker_engine: The system cannot find the file specified.

Is there a way to get it working both remotely and locally at the same time?

Thanks