sonic-buildimage/files/build_templates/docker_image_ctl.j2
Oleksandr Ivantsiv 34ea91349c one image implementation (#215)
* Single image

* Fix review comments

* Update syncd service. Add HW mgmt to Mellanox single image.

* Add single image template for Broadcom platform.

SKU should be provided during configure:
make configure PLATFORM=broadcom SKU=Force10-S6000

* Add single image template for Cavium platform.

SKU should be provided during configure:
make configure PLATFORM=cavium SKU=AS7512

* Add description to sonic_debian_extension.j2 file.
2017-01-29 11:33:33 -08:00

26 lines
477 B
Django/Jinja

#!/bin/bash
start() {
docker inspect --type container {{docker_container_name}} &>/dev/null
if [ "$?" -eq "0" ]; then
docker start -a {{docker_container_name}}
else
docker run {{docker_image_run_opt}} --name={{docker_container_name}} {{docker_image_name}}
fi
}
stop() {
docker stop {{docker_container_name}}
}
case "$1" in
start|stop)
$1
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac