Skip to content

Commit

Permalink
Add shm_size to build-options (issue #3866)
Browse files Browse the repository at this point in the history
 * 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>
  • Loading branch information
hoogenm authored and shin- committed Oct 16, 2017
1 parent ce19f43 commit 38073bb
Show file tree
Hide file tree
Showing 9 changed files with 569 additions and 1 deletion.
1 change: 1 addition & 0 deletions compose/config/config.py
Expand Up @@ -1020,6 +1020,7 @@ def to_dict(service):
md.merge_scalar('dockerfile')
md.merge_scalar('network')
md.merge_scalar('target')
md.merge_scalar('shm_size')
md.merge_mapping('args', parse_build_arguments)
md.merge_field('cache_from', merge_unique_items_lists, default=[])
md.merge_mapping('labels', parse_labels)
Expand Down
3 changes: 2 additions & 1 deletion compose/config/config_schema_v2.3.json
Expand Up @@ -91,7 +91,8 @@
"labels": {"$ref": "#/definitions/list_or_dict"},
"cache_from": {"$ref": "#/definitions/list_of_strings"},
"network": {"type": "string"},
"target": {"type": "string"}
"target": {"type": "string"},
"shm_size": {"type": ["integer", "string"]}
},
"additionalProperties": false
}
Expand Down

0 comments on commit 38073bb

Please sign in to comment.