# 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:** 1

<div class="post-metadata">

**Author:** ![Chopper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chopper/32/57073_2.png) [@Chopper](https://meta.discourse.org/u/Chopper)\
**Post date:** [2017 年 8 月 24 日午後 3:19 UTC](https://meta.discourse.org/t/update-etc-hosts-at-rebuild/68703/1 "2017-08-24T15:19:18Z")

</div>

Hello,

I try to add a command to the `app.yml` file to add an entry to the host file in the docker container at the rebuild.  
But this command never works and i can’t understand why 🤐

```plaintext
run:  
   - exec: "echo '192.168.0.1 custom.domain.fr' >> /etc/hosts"

```

Any how to update the /etc/hosts at rebuild ?

---

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