Skip to content

Commit 3534e67

Browse files
committed
Add debug log for saving docker images
1 parent ce2cd86 commit 3534e67

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dev-tools/mage/dockerbuilder.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ import (
1111
"fmt"
1212
"io"
1313
"io/fs"
14+
"log"
1415
"maps"
1516
"os"
1617
"os/exec"
1718
"path/filepath"
1819
"strings"
1920
"time"
2021

22+
"github.com/magefile/mage/mg"
23+
2124
"github.com/elastic/elastic-agent/internal/pkg/agent/install"
2225
"github.com/elastic/elastic-agent/pkg/component"
2326

@@ -270,6 +273,11 @@ func (b *dockerBuilder) dockerSave(tag string, templateExtraArgs ...map[string]i
270273
}
271274
outputFile = filepath.Join(distributionsDir, outputTar)
272275
}
276+
277+
if mg.Verbose() {
278+
log.Printf(">>>> saving docker image %s to %s", tag, outputFile)
279+
}
280+
273281
var stderr bytes.Buffer
274282
cmd := exec.Command("docker", "save", tag)
275283
cmd.Stderr = &stderr

0 commit comments

Comments
 (0)