[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
master
Peter Schiffer 2017-12-01 23:41:37 +01:00
parent 3ec3a341e4
commit 7d6fc8e6b6
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import docker
import signal import signal
import time 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__) app = Flask(__name__)
api = Api(app) api = Api(app)