Fix pull parameter for docker server version < 1.7.

This commit is contained in:
Giorgos Logiotatidis 2015-06-01 20:22:46 +03:00
parent fd1722591b
commit 739d875854
1 changed files with 6 additions and 0 deletions

View File

@ -352,6 +352,12 @@ class Client(requests.Session):
'dockerfile was only introduced in API version 1.17'
)
# Docker server 1.6 only supports values 1 and 0 for pull
# parameter. This was later fixed to support a wider range of
# values, including true / false.
# See also https://github.com/docker/docker/issues/13631
pull = 1 if pull else 0
u = self._url('/build')
params = {
't': tag,