title: .NET Framework - Environment Variables return null
body: <p>I would like to get environment variables from windows container which is ran by docker command but I could not get expected value of the variables.</p>
  <p>In Dockerfile, I placed one of instructions likes</p>
  <pre><code>ENV Hello=World
  </code></pre>
  <p>In command prompt of windows, it runs a command of</p>
  <pre><code>docker build -t myapp .
  </code></pre>
  <p>and the image build successfully. Then run the image</p>
  <pre><code>docker run -e &quot;Hello=Bye&quot; myapp
  </code></pre>
  <p>In C#, I tried to get the environment variable <strong>Hello</strong> by</p>
  <pre><code>string debug = Environment.GetEnvironmentVariable(&quot;Hello&quot;);
  </code></pre>
  <p>and the <code>debug</code> would get <code>World</code>.<br>
  If the instruction <code>ENV Hello=World</code> is not placed in Dockerfile, the <code>debug</code> would get <code>null</code>.<br><br>
  I don't know what I should do in C# that getting <code>debug</code> with the value <code>Bye</code> which is my expected result. Thanks for the help.</p>