title: Docker Swarm with image versions externalized to .env file
body: <p>I used to externalized my image versions to my .env file. This make it easy to maintain and I don't modify my <code>docker-compose.yml</code> file just to upgrade a version, so I'm sure I won't delete a line by mistake or whatever.</p>
  
  <p>But when I try to deploy my services with <code>stack</code> to the <code>swarm</code>, docker engine complains that my image is not a correct reposity/tag, with the exact following message : </p>
  
  <blockquote>
    <p>Error response from daemon: rpc error: code = 3 desc = ContainerSpec: "GROUP/IMAGE:" is not a valid repository/tag</p>
  </blockquote>
  
  <p>To fix this, I can fix the image version directly in the <code>docker-compose.yml</code> file. Is there any logic here or it that a bug? But this mixes fix part of the docker-compose and variable ones.</p>
  
  <p>Cheers,
  Olivier</p>