Sketch inception wiring: make it easier to run unsafe sketch inside Sketch
By renaming the api key env variable, you can run "sketch -unsafe"
both with and without skaband without removing /.dockerenv and
re-writing env variables. Previously this was painful. We're using
"--outside-hostname" to indicate the fact that we're an "inside sketch".
diff --git a/dockerimg/dockerimg.go b/dockerimg/dockerimg.go
index 1486435..722e3e6 100644
--- a/dockerimg/dockerimg.go
+++ b/dockerimg/dockerimg.go
@@ -421,14 +421,14 @@
"-it",
"--name", cntrName,
"-p", hostPort + ":80", // forward container port 80 to a host port
- "-e", "ANTHROPIC_API_KEY=" + config.AntAPIKey,
+ "-e", "SKETCH_ANTHROPIC_API_KEY=" + config.AntAPIKey,
}
for _, envVar := range getEnvForwardingFromGitConfig(ctx) {
cmdArgs = append(cmdArgs, "-e", envVar)
}
if config.AntURL != "" {
- cmdArgs = append(cmdArgs, "-e", "ANT_URL="+config.AntURL)
+ cmdArgs = append(cmdArgs, "-e", "SKETCH_ANT_URL="+config.AntURL)
}
if config.SketchPubKey != "" {
cmdArgs = append(cmdArgs, "-e", "SKETCH_PUB_KEY="+config.SketchPubKey)