hjacobs / local-cname Goto Github PK
View Code? Open in Web Editor NEWHelper script to emulate a local CNAME DNS by writing to /etc/hosts
Home Page: https://pypi.org/project/local-cname/
License: GNU General Public License v3.0
Helper script to emulate a local CNAME DNS by writing to /etc/hosts
Home Page: https://pypi.org/project/local-cname/
License: GNU General Public License v3.0
I installed local-cname on a new Ubuntu 18.04 VM. First I installed Python on it with "sudo apt-get install python-pip" and then local-cname with "sudo pip install -U local-cname". When I tried "sudo local-cname google.com duckduckgo.com" I received the following: "ImportError: No module named pathlib". I then installed pathlib with "sudo pip install pathlib".
Now when I try "sudo local-cname google.com duckduckgo.com" I receive this: "Resolving duckduckgo.com .. EXCEPTION OCCURRED: getaddrinfo() takes no keyword arguments". Please see the screenshot attached.
Hi.. I'm getting the following error when running inside docker when I stop the service.
OSError: [Errno 16] Device or resource busy: '/etc/hosts.local-cname-backup' -> '/etc/hosts'
/etc/hosts
is mounted by the docker daemon so the rename will fail.
# mount | grep hosts
/dev/nvme0n1p1 on /etc/hosts type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
A good way of fixing could be something like detecting if /etc/hosts is mounted and if do, just do something like a cat
over the file (like the pseudo code):
cat /etc/hosts.local-cname-backup > /etc/hosts
rm /etc/hosts.local-cname-backup
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.