Fix -open to point to skaband addr when configured for the container case
We were opening on the skaband address if using -unsafe but
not doing the same in the container case.
diff --git a/dockerimg/dockerimg.go b/dockerimg/dockerimg.go
index bc943b8..f934c2f 100644
--- a/dockerimg/dockerimg.go
+++ b/dockerimg/dockerimg.go
@@ -278,11 +278,16 @@
slog.ErrorContext(ctx, "LaunchContainer.postContainerInitConfig", slog.String("err", err.Error()))
errCh <- appendInternalErr(err)
}
- }()
- if config.OpenBrowser {
- OpenBrowser(ctx, "http://"+localAddr)
- }
+ // We open the browser after the init config because the above waits for the web server to be serving.
+ if config.OpenBrowser {
+ if config.SkabandAddr != "" {
+ OpenBrowser(ctx, fmt.Sprintf("%s/s/%s", config.SkabandAddr, config.SessionID))
+ } else {
+ OpenBrowser(ctx, "http://"+localAddr)
+ }
+ }
+ }()
go func() {
cmd := exec.CommandContext(ctx, "docker", "attach", cntrName)