8e425ebc42
Container queries are now served from the consistent in-memory db, and don't need to grab a lock on every container being listed. Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
20 lines
518 B
Go
20 lines
518 B
Go
package daemon
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/docker/docker/container"
|
|
)
|
|
|
|
// excludeByIsolation is a platform specific helper function to support PS
|
|
// filtering by Isolation. This is a Windows-only concept, so is a no-op on Unix.
|
|
func excludeByIsolation(container *container.Snapshot, ctx *listContext) iterationAction {
|
|
i := strings.ToLower(string(container.HostConfig.Isolation))
|
|
if i == "" {
|
|
i = "default"
|
|
}
|
|
if !ctx.filters.Match("isolation", i) {
|
|
return excludeContainer
|
|
}
|
|
return includeContainer
|
|
}
|