Skip to content

Commit 739d875

Browse files
committed
Fix pull parameter for docker server version < 1.7.
1 parent fd17225 commit 739d875

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docker/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,12 @@ def build(self, path=None, tag=None, quiet=False, fileobj=None,
352352
'dockerfile was only introduced in API version 1.17'
353353
)
354354

355+
# Docker server 1.6 only supports values 1 and 0 for pull
356+
# parameter. This was later fixed to support a wider range of
357+
# values, including true / false.
358+
# See also https://github.com/docker/docker/issues/13631
359+
pull = 1 if pull else 0
360+
355361
u = self._url('/build')
356362
params = {
357363
't': tag,

0 commit comments

Comments
 (0)