2018-02-05 21:05:59 +00:00
|
|
|
package daemon // import "github.com/docker/docker/daemon"
|
2015-10-19 16:33:43 +00:00
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"github.com/docker/docker/container"
|
|
|
|
)
|
2015-10-19 16:33:43 +00:00
|
|
|
|
|
|
|
// 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.
|
2017-02-22 23:01:46 +00:00
|
|
|
func excludeByIsolation(container *container.Snapshot, ctx *listContext) iterationAction {
|
2022-09-23 18:09:51 +00:00
|
|
|
i := strings.ToLower(container.HostConfig.Isolation)
|
2015-10-19 16:33:43 +00:00
|
|
|
if i == "" {
|
|
|
|
i = "default"
|
|
|
|
}
|
|
|
|
if !ctx.filters.Match("isolation", i) {
|
|
|
|
return excludeContainer
|
|
|
|
}
|
|
|
|
return includeContainer
|
|
|
|
}
|