Skip to content

Commit

Permalink
Merge pull request #1277 from junnplus/start-network
Browse files Browse the repository at this point in the history
skip reconfig network when missing
  • Loading branch information
AkihiroSuda committed Jul 30, 2022
2 parents 4c37225 + d0fe7ab commit 10c5537
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/nerdctl/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ func startContainer(ctx context.Context, container containerd.Container, flagA b
}

func reconfigNetContainer(ctx context.Context, c containerd.Container, client *containerd.Client, lab map[string]string) error {

networksJSON := lab[labels.Networks]
networksJSON, ok := lab[labels.Networks]
if !ok {
return nil
}
var networks []string
if err := json.Unmarshal([]byte(networksJSON), &networks); err != nil {
return err
Expand Down

0 comments on commit 10c5537

Please sign in to comment.