We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MACOS
It seems not work on OS X
$ docker run -d -v /var/run/docker.sock:/tmp/docker.sock -v /etc/hosts:/tmp/hosts dvdarias/docker-hoster 5333e1b472c0d58d1b75b63d076913e8974ed74b04a820f7b55caccede76594a
$ docker logs 5333e1b472c0d
Updating hosts file with: ip: 172.17.0.2 domains: ['vigilant_northcutt', '5333e1b472c0'] ip: 172.18.0.3 domains: {'hrs-ms-region', 'hrs-microservice-region', '65cde9c7813e'} ip: 172.18.0.2 domains: {'d0fa9a1c14fa', 'mysql'} Traceback (most recent call last): File "hoster.py", line 135, in main() File "hoster.py", line 38, in main update_hosts_file() File "hoster.py", line 97, in update_hosts_file with open(hosts_path,"r+") as hosts_file: PermissionError: [Errno 1] Operation not permitted: '/tmp/hosts'
The text was updated successfully, but these errors were encountered:
Hi @rs-renato, may be sudo chflags nouappnd /etc/hosts on your host will help?
sudo chflags nouappnd /etc/hosts
Or another solution could be:
sudo chmod -N /etc/hosts # Remove ACLs from file sudo chflags nouchg /etc/hosts # Clear the user immutable flag from file sudo chflags norestricted /etc/hosts # Remove the SIP protection from file sudo xattr -d com.apple.rootless /etc/hosts # Remove SIP protection from file
But I don't have a Mac. Use these commands at your own risk, these are not tested.
Sorry, something went wrong.
No branches or pull requests
MACOS
It seems not work on OS X
$ docker run -d -v /var/run/docker.sock:/tmp/docker.sock -v /etc/hosts:/tmp/hosts dvdarias/docker-hoster
5333e1b472c0d58d1b75b63d076913e8974ed74b04a820f7b55caccede76594a
$ docker logs 5333e1b472c0d
Updating hosts file with:
ip: 172.17.0.2 domains: ['vigilant_northcutt', '5333e1b472c0']
ip: 172.18.0.3 domains: {'hrs-ms-region', 'hrs-microservice-region', '65cde9c7813e'}
ip: 172.18.0.2 domains: {'d0fa9a1c14fa', 'mysql'}
Traceback (most recent call last):
File "hoster.py", line 135, in
main()
File "hoster.py", line 38, in main
update_hosts_file()
File "hoster.py", line 97, in update_hosts_file
with open(hosts_path,"r+") as hosts_file:
PermissionError: [Errno 1] Operation not permitted: '/tmp/hosts'
The text was updated successfully, but these errors were encountered: