docker-hostmanager icon indicating copy to clipboard operation
docker-hostmanager copied to clipboard

Windows support

Open aistis- opened this issue 7 years ago • 8 comments

Hey guys, does it work on windows? Cannot test it at the moment.

aistis- avatar Aug 29 '16 12:08 aistis-

You can run this on Windows to

docker run -d --name docker-hostmanager --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v C:/Windows/System32/drivers/etc/hosts:/hosts iamluc/docker-hostmanager

Or mount the volume to your hosts location. But you still will get the error: Invalid directory. Volume directories must be under your Users directory So its probably imposible in easy way :)

FDiskas avatar Aug 29 '16 20:08 FDiskas

You could try to use the phar directly instead of the docker image, like for mac. See https://github.com/iamluc/docker-hostmanager#mac-os

iamluc avatar Aug 30 '16 12:08 iamluc

:snowboarder: Probably posible solution

docker run -d --name docker-hostmanager --restart=always -v "C:\Windows\System32\drivers\etc\hosts:/etc/hosts" iamluc/docker-hostmanager

But still there is no permissions to access hosts file

docker: Error response from daemon: chown /C/Windows/System32/drivers/etc/hosts: permission denied.

So I changed the permission added allow to write (not secure) so now its works on windows to.

FDiskas avatar Jan 16 '17 08:01 FDiskas

You should update the readme

FDiskas avatar Jan 28 '17 21:01 FDiskas

Thanks @FDiskas . Could you open a Pull request ?

iamluc avatar Jan 30 '17 08:01 iamluc

:ab: More tests needed.

FDiskas avatar Jan 30 '17 12:01 FDiskas

@FDiskas how is this supposed to work without mounting the docker sock?

bernhardberger avatar Sep 25 '17 15:09 bernhardberger

@bernhardberger can't remember :)

FDiskas avatar Sep 30 '17 13:09 FDiskas