Ver código fonte

[Dockerapi] Auto detect version of docker server

Some older versions of docker need specific version of client api to be able to
communicate. This change allows automatically detect and set version of API to
match server version of API.

Fixes #765
Peter Schiffer 8 anos atrás
pai
commit
7d6fc8e6b6
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      data/Dockerfiles/dockerapi/server.py

+ 1 - 1
data/Dockerfiles/dockerapi/server.py

@@ -7,7 +7,7 @@ import docker
 import signal
 import time
 
-docker_client = docker.DockerClient(base_url='unix://var/run/docker.sock')
+docker_client = docker.DockerClient(base_url='unix://var/run/docker.sock', version='auto')
 app = Flask(__name__)
 api = Api(app)