Skip to content

Commit

Permalink
Fix issues where docker client may be incompatible with docker server…
Browse files Browse the repository at this point in the history
… API by forcing to APV version 1.24
  • Loading branch information
timlinux committed Jun 2, 2018
1 parent 990aa4b commit 096dc10
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions scripts/docker/env/development/django.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ PUBLIC_PORT=8000
DOCKER_HOST_IP
DEBUG=True
C_FORCE_ROOT=1
# See https://github.com/geosolutions-it/geonode-generic/issues/28
# to see why we force API version to 1.24
DOCKER_API_VERSION: "1.24"
3 changes: 3 additions & 0 deletions scripts/docker/env/production/django.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ GEOSERVER_PUBLIC_LOCATION=http://geonode/geoserver/
GEOSERVER_LOCATION=http://geonode/geoserver/
SITEURL=http://geonode/
COMPOSE_HTTP_TIMEOUT=300
# See https://github.com/geosolutions-it/geonode-generic/issues/28
# to see why we force API version to 1.24
DOCKER_API_VERSION: "1.24"
4 changes: 2 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def fixtures(ctx):


def _docker_host_ip():
client = docker.from_env()
client = docker.from_env(version='1.24')
ip_list = client.containers.run(BOOTSTRAP_IMAGE_CHEIP,
network_mode='host'
).split("\n")
Expand All @@ -93,7 +93,7 @@ def _docker_host_ip():


def _container_exposed_port(component, instname):
client = docker.from_env()
client = docker.from_env(version='1.24')
try:
ports_dict = json.dumps(
[c.attrs['Config']['ExposedPorts'] for c in client.containers.list(
Expand Down

0 comments on commit 096dc10

Please sign in to comment.