title: docker-compose, can't print environment variable in docker container
body: <p>I want to print environment variable defined in docker-compose file.</p>
  
  <p>Here is my <code>docker-compose-1.yml</code>:</p>
  
  <pre><code>version: '3.6'
  
  services:
    busybox:
      image: busybox
      command: 'echo $DEBUG'
      environment:
        - DEBUG='123456'
  </code></pre>
  
  <p>And, try to print the <code>DEBUG</code> environment variable in docker container:</p>
  
  <pre><code>☁  environment-variables-in-compose [master] ⚡  docker-compose -f docker-compose-1.yml up
  WARNING: The DEBUG variable is not set. Defaulting to a blank string.
  Creating network "environmentvariablesincompose_default" with the default driver
  Creating environmentvariablesincompose_busybox_1 ... done
  Attaching to environmentvariablesincompose_busybox_1
  busybox_1  |
  environmentvariablesincompose_busybox_1 exited with code 0
  </code></pre>
  
  <p>As you can see, got <code>WARNING: The DEBUG variable is not set. Defaulting to a blank string.</code> </p>
  
  <p>Am I wrong?</p>
  
  <p><strong>update 1:</strong></p>
  
  <p><code>docker-compose-1.yml</code>:</p>
  
  <pre><code>version: '3.6'
  
  services:
    busybox:
      image: busybox
      command: 'echo $$DEBUG'
      environment:
        DEBUG: 123456
  </code></pre>
  
  <p>I change <code>command</code> using double <code>$</code> sign, but the result is still not what I want.</p>
  
  <pre><code>☁  environment-variables-in-compose [master] ⚡  docker-compose -f docker-compose-1.yml up
  Creating network "environmentvariablesincompose_default" with the default driver
  Creating environmentvariablesincompose_busybox_1 ... done
  Attaching to environmentvariablesincompose_busybox_1
  busybox_1  | $DEBUG
  environmentvariablesincompose_busybox_1 exited with code 0
  </code></pre>
  
  <p>As you can see, the environment variable is printed as <code>$DEBUG</code>, not expected value <code>123456</code></p>