Map /src & /debug for debug docker containers (#3470)
* Add debug docker for SNMP. * Removed a redundant install of debug packages. Propagate the debug flag to template file to mount /dbg & /src to debug containers. * Revert the last change to retain the original
This commit is contained in:
parent
e9037a72ff
commit
0493b6274e
@ -139,6 +139,9 @@ start() {
|
||||
# TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version
|
||||
{%- endif %}
|
||||
docker create {{docker_image_run_opt}} \
|
||||
{%- if install_debug_image == "y" %}
|
||||
-v /src:/src:ro -v /debug:/debug:rw \
|
||||
{%- endif %}
|
||||
{%- if '--log-driver=json-file' in docker_image_run_opt or '--log-driver' not in docker_image_run_opt %}
|
||||
--log-opt max-size=2M --log-opt max-file=5 \
|
||||
{%- endif %}
|
||||
|
1
slave.mk
1
slave.mk
@ -581,6 +581,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
||||
export swsssdk_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SWSSSDK_PY2))"
|
||||
export platform_common_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2))"
|
||||
export redis_dump_load_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(REDIS_DUMP_LOAD_PY2))"
|
||||
export install_debug_image="$(INSTALL_DEBUG_TOOLS)"
|
||||
|
||||
$(foreach docker, $($*_DOCKERS),\
|
||||
export docker_image="$(docker)"
|
||||
|
Reference in New Issue
Block a user