Merge pull request #322 from kshelton/main
Handle leading '/' in names for docker runtime (thanks @kshelton)
This commit is contained in:
commit
7b07b8b6dc
@ -147,7 +147,8 @@ func getNodeContainer(ctx context.Context, node *k3d.Node) (*types.Container, er
|
||||
for k, v := range node.Labels {
|
||||
filters.Add("label", fmt.Sprintf("%s=%s", k, v))
|
||||
}
|
||||
filters.Add("name", fmt.Sprintf("^%s$", node.Name)) // regex filtering for exact name match
|
||||
// See https://github.com/moby/moby/issues/29997 for explanation around initial /
|
||||
filters.Add("name", fmt.Sprintf("^/?%s$", node.Name)) // regex filtering for exact name match
|
||||
|
||||
containers, err := docker.ContainerList(ctx, types.ContainerListOptions{
|
||||
Filters: filters,
|
||||
|
Loading…
Reference in New Issue
Block a user