# Dockerコンテナにカスタム環境変数を渡すことは可能ですか？

**URL:** <https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795>\
**Category:** Self-hosting\
**Created:** [2020 年 9 月 2 日午後 12:20 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:** 4

<div class="post-metadata">

**Author:** ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Post date:** [2020 年 9 月 2 日午後 4:41 UTC](https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795/4 "2020-09-02T16:41:10Z")

</div>

> [@justin](#):
>
> これにコンテナ定義の `env:` セクションを使うことはできませんか？

それだと Docker に関連するエラーが発生します。もしそう動作すれば非常に直感的だったのにね 🙂 もしかして私が変なのかな。カスタム変数は `DISCOURSE_` で始まるもののみ許可するというルールがあると思います。

---

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