title: How can I pass a multi-line variable to a docker container?
body: <p>According to <a href="https://github.com/docker/docker/issues/12997#issuecomment-204580515" rel="noreferrer">this comment,</a> multi-line variables are supported with <code>docker compose</code>:</p>
  
  <pre><code>environment:
    KEY: |-
      line1
      line2
  </code></pre>
  
  <p>However, when I execute <code>echo $KEY</code> in the container, it has replaced the newline with spaces:</p>
  
  <p><code>line1 line2</code></p>
  
  <p>Am I missing something? My docker version is 1.12.1.</p>