# How to configure static IP for discourse container

**URL:** <https://meta.discourse.org/t/how-to-configure-static-ip-for-discourse-container/51616>\
**Category:** Self-hosting\
**Created:** [2016年十月16日 21:59 UTC](https://meta.discourse.org/t/how-to-configure-static-ip-for-discourse-container/51616 "2016-10-16T21:59:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wil93](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wil93/32/121264_2.png) [@wil93](https://meta.discourse.org/u/wil93)\
**Post date:** [2016年十月16日 21:59 UTC](https://meta.discourse.org/t/how-to-configure-static-ip-for-discourse-container/51616/1 "2016-10-16T21:59:48Z")

</div>

Since docker 1.10 it’s possible to set a static IP address for docker containers. This is useful when you have a nginx instance managing a lot of sites.

I guess one should edit the `.yml` file, but I’m not sure how

---

<div class="post-metadata">

**Author:** ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)\
**Post date:** [2016年十月16日 22:02 UTC](https://meta.discourse.org/t/how-to-configure-static-ip-for-discourse-container/51616/2 "2016-10-16T22:02:40Z")

</div>

You should use links, rather than hard-coded IPs, to refer to other containers.

---

<div class="post-metadata">

**Author:** ![wil93](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wil93/32/121264_2.png) [@wil93](https://meta.discourse.org/u/wil93)\
**Post date:** [2016年十月17日 05:36 UTC](https://meta.discourse.org/t/how-to-configure-static-ip-for-discourse-container/51616/3 "2016-10-17T05:36:52Z")

</div>

But I need to refer to a container from the actual host, not from another container, how could links help?

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2019年三月18日 20:32 UTC](https://meta.discourse.org/t/how-to-configure-static-ip-for-discourse-container/51616/4 "2019-03-18T20:32:19Z")

</div>



---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年三月19日 02:39 UTC](https://meta.discourse.org/t/how-to-configure-static-ip-for-discourse-container/51616/5 "2019-03-19T02:39:06Z")

</div>

We have `--docker-args` args for that these days you can append whatever docker arguments you want to `./launcher`

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2019年三月19日 02:39 UTC](https://meta.discourse.org/t/how-to-configure-static-ip-for-discourse-container/51616/6 "2019-03-19T02:39:14Z")

</div>


