fix(libstack): add a different timeout for WaitForStatus BE-11376 (#120)
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/portainer/portainer/pkg/libstack"
|
||||
|
||||
@@ -21,6 +22,8 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
var mu sync.Mutex
|
||||
|
||||
func withCli(
|
||||
ctx context.Context,
|
||||
options libstack.Options,
|
||||
@@ -47,9 +50,12 @@ func withCli(
|
||||
|
||||
opts.ConfigDir = tempDir
|
||||
|
||||
mu.Lock()
|
||||
if err := cli.Initialize(opts); err != nil {
|
||||
mu.Unlock()
|
||||
return fmt.Errorf("unable to initialize the Docker client: %w", err)
|
||||
}
|
||||
mu.Unlock()
|
||||
defer cli.Client().Close()
|
||||
|
||||
for _, r := range options.Registries {
|
||||
|
||||
Reference in New Issue
Block a user