mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-20 10:27:46 +08:00
docker-container: increase bootstrap timeout
Previous value was only 2 sec Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
8627f668f2
commit
26570d05c1
@ -117,12 +117,12 @@ func (d *Driver) create(ctx context.Context, l progress.SubLogger) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Driver) wait(ctx context.Context, l progress.SubLogger) error {
|
func (d *Driver) wait(ctx context.Context, l progress.SubLogger) error {
|
||||||
try := 0
|
try := 1
|
||||||
for {
|
for {
|
||||||
bufStdout := &bytes.Buffer{}
|
bufStdout := &bytes.Buffer{}
|
||||||
bufStderr := &bytes.Buffer{}
|
bufStderr := &bytes.Buffer{}
|
||||||
if err := d.run(ctx, []string{"buildctl", "debug", "workers"}, bufStdout, bufStderr); err != nil {
|
if err := d.run(ctx, []string{"buildctl", "debug", "workers"}, bufStdout, bufStderr); err != nil {
|
||||||
if try > 10 {
|
if try > 15 {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
d.copyLogs(context.TODO(), l)
|
d.copyLogs(context.TODO(), l)
|
||||||
if bufStdout.Len() != 0 {
|
if bufStdout.Len() != 0 {
|
||||||
@ -137,7 +137,7 @@ func (d *Driver) wait(ctx context.Context, l progress.SubLogger) error {
|
|||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
case <-time.After(time.Duration(100+try*20) * time.Millisecond):
|
case <-time.After(time.Duration(try*120) * time.Millisecond):
|
||||||
try++
|
try++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user