Skip to content
New issue

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

Error on updating hosts file (ubuntu 20) #10

Open
AndroiDjo opened this issue Aug 4, 2021 · 1 comment
Open

Error on updating hosts file (ubuntu 20) #10

AndroiDjo opened this issue Aug 4, 2021 · 1 comment

Comments

@AndroiDjo
Copy link

When i run command
docker run -d \ -v /var/run/docker.sock:/tmp/docker.sock \ -v /etc/hosts:/tmp/hosts \ dvdarias/docker-hoster
got error
Traceback (most recent call last): File "hoster.py", line 135, in <module> main() File "hoster.py", line 38, in main update_hosts_file() File "hoster.py", line 107, in update_hosts_file while lines[-1].strip()=="": lines.pop() IndexError: list index out of range
and file /etc/hosts is empty.

My system is Ubuntu 20.

@PierrePetit
Copy link

PierrePetit commented Sep 24, 2022

Here is what I did to reslove it. On the host machine :
sudo nano /etc/hosts
add a line (pretty random, I used this one) :
127.0.0.1 localhost me.local
and then :
docker restart docker-hoster

Hope this helps someone, It's the first link I found when I encountered the error :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants