mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix(libstack): add a different timeout for WaitForStatus BE-11376 (#120)
This commit is contained in:
parent
7444e2c1c7
commit
2e9e459aa3
2 changed files with 11 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue