Docker Compose - yenbohuang/techNotes GitHub Wiki

No module named ssl_match_hostname

Check the computer and see which version is running on the computer. For example, the one under ~/.local/bin/ is the one which actually runs (maybe it was installed by Azure IoT edge tools).

/usr/bin/docker-compose
/home/yenbohuang/.local/bin/docker-compose

This is the error log on my computer:

Traceback (most recent call last):
  File "./docker-compose", line 6, in <module>
    from compose.cli.main import main
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/compose/cli/main.py", line 17, in <module>
    import docker
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/__init__.py", line 2, in <module>
    from .api import APIClient
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/api/__init__.py", line 2, in <module>
    from .client import APIClient
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/api/client.py", line 10, in <module>
    from .build import BuildApiMixin
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/api/build.py", line 6, in <module>
    from .. import auth
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/auth.py", line 9, in <module>
    from .utils import config
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/utils/__init__.py", line 3, in <module>
    from .decorators import check_resource, minimum_version, update_headers
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/utils/decorators.py", line 4, in <module>
    from . import utils
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/utils/utils.py", line 13, in <module>
    from .. import tls
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/tls.py", line 5, in <module>
    from .transport import SSLHTTPAdapter
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/transport/__init__.py", line 3, in <module>
    from .ssladapter import SSLHTTPAdapter
  File "/home/yenbohuang/.local/lib/python2.7/site-packages/docker/transport/ssladapter.py", line 23, in <module>
    from backports.ssl_match_hostname import match_hostname
ImportError: No module named ssl_match_hostname

Download the latest docker-compose from github and replace the one which does not run and fix it.

Compose does not support 'deploy' configuration

If you use "deploy" key in docker-compose file, you will see something like this for v3.X format.

WARNING: Some services (grafana, graphite) use the 'deploy' key, which will be ignored.
Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm.
Creating network "local_botnet" with driver "bridge"

You can run the following command as a workaround:

docker-compose --compatibility up

Refer to this link for more details: https://nickjanetakis.com/blog/docker-tip-78-using-compatibility-mode-to-set-memory-and-cpu-limits

⚠️ **GitHub.com Fallback** ⚠️