# É possível passar variáveis de ambiente customizadas para o container Docker?

**URL:** <https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795>\
**Category:** Self-hosting\
**Created:** [Setembro 2, 2020, 12:20pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795 "2020-09-02T12:20:03Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)\
**Post date:** [Setembro 2, 2020, 4:28pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795/3 "2020-09-02T16:28:03Z")

</div>

Você não pode usar a seção `env:` da definição do container para isso? Isso deve criar uma variável de ambiente que o aplicativo Rails pode acessar.

Então, algo assim:

```plaintext
env:
  CUSTOM_ENV: "valor"

```

Caso contrário, parece que o [pups já injeta variáveis de ambiente do host](https://github.com/discourse/pups#environment-variables), também.

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795)._
