title: Docker: how to build an image from a non-master branch on Github repository
body: <p>Is it possible to build an image from a non-master branch on a Github repository?</p>
  
  <p>For example, I have the repository <code>//github.com/myAccount/docker-myImage</code> with a branch <code>development</code> that I would like to use for my image. Unfortunately, the following command only seems to allow building from the <code>master</code> branch:</p>
  
  <pre><code>docker build -t myAccount/myImage git://github.com/myAccount/docker-myImage
  </code></pre>
  
  <p>Here is the relevant documentation from <code>man docker build</code>:</p>
  
  <blockquote>
    <p>Building an image using a URL</p>
    
    <p>This will clone the specified Github repository from the URL and use it as context. The Dockerfile at the root of the repository is
    used as Dockerfile. This only works if the Github repository is a
    dedicated repository.</p>
  
  <pre><code>docker build github.com/scollier/Fedora-Dockerfiles/tree/master/apache
  </code></pre>
    
    <p>Note: You can set an arbitrary Git repository via the git:// schema.</p>
  </blockquote>
  
  <p>Perhaps there is an alternative, like <code>docker build -t myAccount/myImage git://github.com/myAccount/docker-myImage:development</code>?</p>