2017-03-27 16 views

答えて

3

私は現時点で便利なノードを持っていませんが、単にdocker node lsのようなものを実行できるかのように見えます。

Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again. 

そして、それはそうテストは次のようになります

$ echo $? 
1 

ゼロ以外の終了コードを返しますでの結果という、群れノードでないドッカデーモンをターゲットにする場合

if docker node ls > /dev/null 2>&1; then 
    echo this is a swarm node 
else 
    echo this is a standalone node 
fi 
関連する問題