title: Set Multiline Environment Variable with Dockerfile
body: <p>I want to set a multiline environment variable in my Dockerfile.</p>
  
  <h2>Works through command line</h2>
  
  <p>If I pass in the environment variable through <code>docker run</code> everything works.</p>
  
  <pre><code>CONFIG="port: 4466
  databases:
    prod:
      connector: mysql
      active: true
      host: 33.333.333.333
      port: 3306
      user: root
      password: pass"
  docker run --env CONFIG="$CONFIG" ubuntu:latest env | grep 'CONFIG'
  </code></pre>
  
  <p>Output (its only a single line because its interpreted as multiline variable)</p>
  
  <pre><code>CONFIG=port: 4466
  </code></pre>
  
  <h2>Doesnt Work through dockerfile</h2>
  
  <p><strong>Dockerfile</strong></p>
  
  <pre><code>FROM ubuntu:latest
  ENV CONFIG 'port: 4466\ndatabases:\n  prod:\n    connector: mysql\n    active: true\n    host: host\n    port: 3306\n    user: root\n    password: pass'
  </code></pre>
  
  <p>Build and run the docker image</p>
  
  <pre><code>docker build -t multilinetest .
  docker run multilinetest env | grep 'CONFIG'
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>CONFIG=port: 4466\ndatabases:\n  prod:\n    connector: mysql\n    active: true\n    host: host\n    port: 3306\n    user: root\n    password: pass
  </code></pre>
  
  <h2>Expected</h2>
  
  <p>Both scenarios should store the same environment variable (I'm passing this environment variable into a 3rd party image that requires a multiline string)</p>