# Update /etc/hosts at rebuild

**URL:** <https://meta.discourse.org/t/update-etc-hosts-at-rebuild/68703>\
**Category:** Self-hosting\
**Created:** [2017 年 8 月 24 日午後 3:19 UTC](https://meta.discourse.org/t/update-etc-hosts-at-rebuild/68703 "2017-08-24T15:19:18Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)\
**Post date:** [2017 年 8 月 25 日午後 2:44 UTC](https://meta.discourse.org/t/update-etc-hosts-at-rebuild/68703/5 "2017-08-25T14:44:45Z")

</div>

Well, here’s a slightly messy alternative.

Changes to /etc/hosts file are effectively immediate for the system. Docker creates the file at boot time, while setting up all of the container internal networking. But after that Docker leaves it alone. A “plug-in” that inserted itself into late system boot could add values to the /etc/hosts file. (Or could be a script created via yml.)

I might try to tackle that later today.

---

_[View the full topic](https://meta.discourse.org/t/update-etc-hosts-at-rebuild/68703)._
