title: Passing Environment Variables to Docker Container When Running in Visual Studio
body: <p>We have a .NET Core project in Visual Studio (2017) that has Docker support added.  Our project relies on environment variables to configure itself at start up.  As we understand it, in order to pass environment variable values to a container you specify them as arguments to the <code>docker run</code> command using <code>-e</code>.</p>
  
  <p>When you run the containerized version of the project from Visual Studio by selecting the Docker profile, we noticed that Visual Studio executes a <code>docker run</code> command.  However, we've not been able to figure out how to get Visual Studio to include our environment variable values when it runs the container.</p>
  
  <p>Is there a way to tell Visual Studio to pass our environment variable values to a container it runs?</p>
  
  <p>Note that we do not want to specify the environment variable values in the image since the values will change depending on where it is deployed to.</p>