1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-01-12 04:23:24 +02:00

[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
This commit is contained in:
Peter Schiffer 2017-12-01 23:41:37 +01:00
parent 3ec3a341e4
commit 7d6fc8e6b6

View File

@ -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)