docker-py getarchive destination folder
<p>I am following the instructions given in this link for get_archive()<a href="https://docker-py.readthedocs.io/en/stable/api/#get_archive" rel="nofollow">link</a>
 but instead of creating my container i was trying to use already running container in my case "docker-nginx" as an input string and also the destination folder where my content was residing in nginx server as '/usr/share/nginx/html' and got my output for the stat of the folder too i want to know how can i give the destination folder in this function if not where is my extrated tar file ? i was not able to figure out where my file was downloaded </p>

<p>here is my code
<code>strm,stat=c.get_archive(container_name,'/usr/share/nginx/html')</code></p>

<p>my output for print(strm) is <code>&lt;requests.packages.urllib3.response.HTTPResponse object at 0x7fe3581e1250&gt;
</code>
my output for print(stat) is <code>{u'linkTarget': u'', u'mode': 2147484157, u'mtime': u'2016-10-05T09:37:17.928258508-05:00', u'name': u'html', u'size': 4096}</code></p>

<p>I found out how this function works what it does it returns raw response of a requests made to our container. raw response explaination can be found <a href="http://docs.python-requests.org/en/master/user/quickstart/#raw-response-content" rel="nofollow">in this link</a> 
in order to extract raw content we can use this code so that we can simply read our raw data as text format according to the output file in my case html.</p>

<pre><code>raw_data=strm.read()
f= open('out.html', 'w')
f.write(raw_data)
</code></pre>

python docker raw-data dockerpy