const.py 995 B

12345678910111213141516171819202122232425262728293031323334
  1. from __future__ import absolute_import
  2. from __future__ import unicode_literals
  3. import sys
  4. DEFAULT_TIMEOUT = 10
  5. HTTP_TIMEOUT = 60
  6. IMAGE_EVENTS = ['delete', 'import', 'pull', 'push', 'tag', 'untag']
  7. IS_WINDOWS_PLATFORM = (sys.platform == "win32")
  8. LABEL_CONTAINER_NUMBER = 'com.docker.compose.container-number'
  9. LABEL_ONE_OFF = 'com.docker.compose.oneoff'
  10. LABEL_PROJECT = 'com.docker.compose.project'
  11. LABEL_SERVICE = 'com.docker.compose.service'
  12. LABEL_VERSION = 'com.docker.compose.version'
  13. LABEL_CONFIG_HASH = 'com.docker.compose.config-hash'
  14. COMPOSEFILE_V1 = '1'
  15. COMPOSEFILE_V2_0 = '2.0'
  16. COMPOSEFILE_V2_1 = '2.1'
  17. COMPOSEFILE_V3_0 = '3.0'
  18. API_VERSIONS = {
  19. COMPOSEFILE_V1: '1.21',
  20. COMPOSEFILE_V2_0: '1.22',
  21. COMPOSEFILE_V2_1: '1.24',
  22. COMPOSEFILE_V3_0: '1.24',
  23. }
  24. API_VERSION_TO_ENGINE_VERSION = {
  25. API_VERSIONS[COMPOSEFILE_V1]: '1.9.0',
  26. API_VERSIONS[COMPOSEFILE_V2_0]: '1.10.0',
  27. API_VERSIONS[COMPOSEFILE_V2_1]: '1.12.0',
  28. API_VERSIONS[COMPOSEFILE_V3_0]: '1.12.0',
  29. }