Add platform-monitor container to one image. (#232)

This commit is contained in:
Oleksandr Ivantsiv 2017-02-01 23:02:08 +02:00 committed by lguohan
parent ddbda4ce2e
commit d6f0c4611b
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,12 @@
[Unit]
Description=Platform monitor container
Requires=database.service
After=database.service
[Service]
User={{ sonicadmin_user }}
ExecStart=/usr/bin/{{docker_container_name}}.sh start
ExecStop=/usr/bin/{{docker_container_name}}.sh stop
[Install]
WantedBy=multi-user.target

View File

@ -6,3 +6,8 @@ $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(SONIC_CONFIG_ENGINE)
$(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_BASE)
SONIC_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR)
$(DOCKER_PLATFORM_MONITOR)_CONTAINER_NAME = pmon
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += --net=host --privileged -t
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro