mirror of
https://github.com/docker/compose.git
synced 2025-10-27 17:23:59 +01:00
* Add shm_size to build configuration * Make it possible to enlarge/customize shm size during build * Value in bytes, or use string like "512M" or "1G" ... * Add to compose format 2.3 and (provisionally) >=3.5 format * Add automated test for shm_size in build-opts Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu> Made unit tests compatible with previously added shm_size build-option Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu> Also support shm_size build-opt when conf override Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu> Automated test for shm_size build-option Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu> Schema 3.4, add shm_size to schema 2.3, updated const.py Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu> Corrected typo in config_schema_v3.4 Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu> Add support for g/m/k units for shm_size in build-opts Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu> Reorder imports in service.py Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
64 lines
2.0 KiB
Python
64 lines
2.0 KiB
Python
from __future__ import absolute_import
|
|
from __future__ import unicode_literals
|
|
|
|
import sys
|
|
|
|
from .version import ComposeVersion
|
|
|
|
DEFAULT_TIMEOUT = 10
|
|
HTTP_TIMEOUT = 60
|
|
IMAGE_EVENTS = ['delete', 'import', 'load', 'pull', 'push', 'save', 'tag', 'untag']
|
|
IS_WINDOWS_PLATFORM = (sys.platform == "win32")
|
|
LABEL_CONTAINER_NUMBER = 'com.docker.compose.container-number'
|
|
LABEL_ONE_OFF = 'com.docker.compose.oneoff'
|
|
LABEL_PROJECT = 'com.docker.compose.project'
|
|
LABEL_SERVICE = 'com.docker.compose.service'
|
|
LABEL_NETWORK = 'com.docker.compose.network'
|
|
LABEL_VERSION = 'com.docker.compose.version'
|
|
LABEL_VOLUME = 'com.docker.compose.volume'
|
|
LABEL_CONFIG_HASH = 'com.docker.compose.config-hash'
|
|
NANOCPUS_SCALE = 1000000000
|
|
|
|
SECRETS_PATH = '/run/secrets'
|
|
|
|
COMPOSEFILE_V1 = ComposeVersion('1')
|
|
COMPOSEFILE_V2_0 = ComposeVersion('2.0')
|
|
COMPOSEFILE_V2_1 = ComposeVersion('2.1')
|
|
COMPOSEFILE_V2_2 = ComposeVersion('2.2')
|
|
COMPOSEFILE_V2_3 = ComposeVersion('2.3')
|
|
|
|
COMPOSEFILE_V3_0 = ComposeVersion('3.0')
|
|
COMPOSEFILE_V3_1 = ComposeVersion('3.1')
|
|
COMPOSEFILE_V3_2 = ComposeVersion('3.2')
|
|
COMPOSEFILE_V3_3 = ComposeVersion('3.3')
|
|
COMPOSEFILE_V3_4 = ComposeVersion('3.4')
|
|
COMPOSEFILE_V3_5 = ComposeVersion('3.5')
|
|
|
|
API_VERSIONS = {
|
|
COMPOSEFILE_V1: '1.21',
|
|
COMPOSEFILE_V2_0: '1.22',
|
|
COMPOSEFILE_V2_1: '1.24',
|
|
COMPOSEFILE_V2_2: '1.25',
|
|
COMPOSEFILE_V2_3: '1.30',
|
|
COMPOSEFILE_V3_0: '1.25',
|
|
COMPOSEFILE_V3_1: '1.25',
|
|
COMPOSEFILE_V3_2: '1.25',
|
|
COMPOSEFILE_V3_3: '1.30',
|
|
COMPOSEFILE_V3_4: '1.30',
|
|
COMPOSEFILE_V3_5: '1.30',
|
|
}
|
|
|
|
API_VERSION_TO_ENGINE_VERSION = {
|
|
API_VERSIONS[COMPOSEFILE_V1]: '1.9.0',
|
|
API_VERSIONS[COMPOSEFILE_V2_0]: '1.10.0',
|
|
API_VERSIONS[COMPOSEFILE_V2_1]: '1.12.0',
|
|
API_VERSIONS[COMPOSEFILE_V2_2]: '1.13.0',
|
|
API_VERSIONS[COMPOSEFILE_V2_3]: '17.06.0',
|
|
API_VERSIONS[COMPOSEFILE_V3_0]: '1.13.0',
|
|
API_VERSIONS[COMPOSEFILE_V3_1]: '1.13.0',
|
|
API_VERSIONS[COMPOSEFILE_V3_2]: '1.13.0',
|
|
API_VERSIONS[COMPOSEFILE_V3_3]: '17.06.0',
|
|
API_VERSIONS[COMPOSEFILE_V3_4]: '17.06.0',
|
|
API_VERSIONS[COMPOSEFILE_V3_5]: '17.06.0',
|
|
}
|