docker-hostmanager
docker-hostmanager copied to clipboard
Windows support
Hey guys, does it work on windows? Cannot test it at the moment.
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 :)
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
: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.
You should update the readme
Thanks @FDiskas . Could you open a Pull request ?
:ab: More tests needed.
@FDiskas how is this supposed to work without mounting the docker sock?
@bernhardberger can't remember :)