title: Docker variables scope
body: <p>I want to know where can I see the variables I have defined. For example, I have three files:</p>
  
  <pre><code>.env 
  BLA=1
  
  docker-compose.xml
  IS_ONE=${BLA}
  
  Dockerfile
  RUN echo "$BLA" &gt;&gt; file.txt
  </code></pre>
  
  <p>I want to know the relation, for example:</p>
  
  <p>Do I need the variable defined in all files? or there a relation like</p>
  
  <ul>
  <li><p>docker-compose.xml can only see .evn variables?</p></li>
  <li><p>Dockerfile can only see docker-compose.xml variables?</p></li>
  </ul>
  
  <p>And, where do I need to declare a variable to use in a bash script automatically triggered in Dockerfile (if it's possible), or use later in the console of the container.</p>