mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix docker system prune failing with Swarm mode disabled
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8f4f85dd5b
commit
4f2ed03092
1 changed files with 5 additions and 0 deletions
|
@ -225,6 +225,11 @@ func (daemon *Daemon) clusterNetworksPrune(pruneFilters filters.Args) (*types.Ne
|
|||
until, _ := getUntilFromPruneFilters(pruneFilters)
|
||||
|
||||
cluster := daemon.GetCluster()
|
||||
|
||||
if !cluster.IsManager() {
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
networks, err := cluster.GetNetworks()
|
||||
if err != nil {
|
||||
return rep, err
|
||||
|
|
Loading…
Add table
Reference in a new issue