shipyard出现500错误或者不显示问题

出现这个问题 主要是因为shipyard的启动顺序不对而导致,所以一旦出现问题只要按照顺序重启docker容器即可.我这里写了一个重启shipyard镜像的shell脚本,仅供参考,不喜勿喷!

vim /mnt/bash/shipyard_restart.sh
#!/bin/bash

PREFIX=shipyard

restart_rethinkdb() {
    docker $1 $PREFIX-rethinkdb
}

restart_discovery() {
    docker $1 $PREFIX-discovery
}

restart_certs() {
    docker $1 $PREFIX-certs
}

restart_proxy() {
    docker $1 $PREFIX-proxy
}

restart_swarm_manager() {
    docker $1 $PREFIX-swarm-manager
}

restart_swarm_agent() {
    docker $1 $PREFIX-swarm-agent
}

restart_controller() {
    docker $1 $PREFIX-controller
}

if [ $# -ne 1 ];
then
        echo "Usage:sh shipyard.sh  {start|stop|restart}"
        exit 1
fi
echo "Restarting Shipyard Begin."
echo "-> ${1}ing Database"
restart_rethinkdb $1
echo "-> ${1}ing Discovery"
restart_discovery $1
echo "-> ${1}ing Cert Volume"
restart_certs $1
echo "-> ${1}ing Proxy"
restart_proxy $1
echo "-> ${1}ing Swarm Manager"
restart_swarm_manager $1
echo "-> ${1}ing Swarm Agent"
restart_swarm_agent $1
echo "-> ${1}ing Controller"
restart_controller $1
echo "${1}ing Shipyard Done."

使用方法

启动:

sh  shipyard.sh start

停止:

sh shipyard.sh stop

重启

sh shipyard.sh restart

你可能感兴趣的:(docker)