use docker restart to restart a container

This commit is contained in:
Sameer Naik
2015-11-13 14:24:53 +05:30
parent 0fbc2f9a48
commit 6b90550b4b

View File

@@ -74,8 +74,7 @@ container_stop() {
# $1: name of the container
container_restart() {
if docker ps | grep -q $CONTAINER_NAME-$1; then
docker stop $CONTAINER_NAME-$1
docker start $CONTAINER_NAME-$1
docker restart $CONTAINER_NAME-$1
sleep $SLEEP_TIME
fi
}