Decode content from docker.get_archive

It looks the data returned by docker.get_arhive cannot be decoded
when sending via RPC. This patch decodes the content on reading
the docker response.

Change-Id: I579910ce5b8e5cd7945d6473db6daa7b3a039f88
Cloes-Bug: #1783051
This commit is contained in:
Hongbin Lu
2018-07-23 04:47:07 +00:00
parent 18bde1df69
commit 2a301ccce0

View File

@@ -680,7 +680,7 @@ class DockerDriver(driver.ContainerDriver):
try:
stream, stat = docker.get_archive(
container.container_id, path)
filedata = stream.read()
filedata = stream.read(decode_content=True)
return filedata, stat
except errors.APIError as api_error:
if is_not_found(api_error):