title: docker stack deploy from private repo
body: <p>Does anyone know how to specify username / password for pulling images from a private registry during a <code>docker stack deploy</code>? I want to be able to do this in one command:</p>
  
  <pre><code>docker stack deploy --compose-file docker-compose.yml --username &lt;user&gt; --password &lt;pass&gt; mystack
  </code></pre>
  
  <p>Without this, I first have to do a </p>
  
  <pre><code>docker login -u &lt;user&gt; -p &lt;pass&gt; &lt;registry-url&gt;
  </code></pre>
  
  <p>Can this be done in one command?</p>