title: How to generate the Dockerfile from an official image?
body: <p>I want to generate the <code>Dockerfile</code> from a official Dockerhub image namely the <a href="https://hub.docker.com/_/influxdb" rel="nofollow noreferrer">influxDB</a>  </p>
  
  <p>After trying the suggested method on </p>
  
  <pre><code>$ alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm centurylink/dockerfile-from-image"
  $ dfimage --help
  $ docker pull influxdb
  $ dfimage influxdb  
  </code></pre>
  
  <p>I get the error message </p>
  
  <pre><code>/usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:42:in `rescue in request': 400 Bad Request: malformed Host header (Docker::Error::ClientError)
      from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:38:in `request'
      from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/connection.rb:65:in `block (2 levels) in &lt;class:Connection&gt;'
      from /usr/lib/ruby/gems/2.2.0/gems/docker-api-1.24.1/lib/docker/image.rb:172:in `all'
      from /usr/src/app/dockerfile-from-image.rb:32:in `&lt;main&gt;'
  </code></pre>
  
  <p>Therefore how can I generate the Dockerfile from the aforementioned image.</p>