File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22"""Support the Deis workflow by manipulating and publishing Docker images."""
33
44import logging
5+ import os
56
67from django .conf import settings
78from rest_framework .exceptions import PermissionDenied
89from simpleflock import SimpleFlock
910import docker
11+ import docker .constants
1012
1113logger = logging .getLogger (__name__ )
1214
@@ -17,7 +19,8 @@ class DockerClient(object):
1719 FLOCKFILE = '/tmp/controller-pull'
1820
1921 def __init__ (self ):
20- self .client = docker .Client (version = 'auto' )
22+ timeout = os .environ .get ('DOCKER_CLIENT_TIMEOUT' , docker .constants .DEFAULT_TIMEOUT_SECONDS )
23+ self .client = docker .Client (version = 'auto' , timeout = timeout )
2124 self .registry = settings .REGISTRY_HOST + ':' + str (settings .REGISTRY_PORT )
2225
2326 def publish_release (self , source , target , deis_registry ):
You can’t perform that action at this time.
0 commit comments