You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sandbox/sandbox.go
+16-7Lines changed: 16 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -42,11 +42,12 @@ import (
42
42
)
43
43
44
44
var (
45
-
listenAddr=flag.String("listen", ":80", "HTTP server listen address. Only applicable when --mode=server")
46
-
mode=flag.String("mode", "server", "Whether to run in \"server\" mode or \"contained\" mode. The contained mode is used internally by the server mode.")
47
-
dev=flag.Bool("dev", false, "run in dev mode (show help messages)")
48
-
numWorkers=flag.Int("workers", runtime.NumCPU(), "number of parallel gvisor containers to pre-spin up & let run concurrently")
49
-
container=flag.String("untrusted-container", "gcr.io/golang-org/playground-sandbox-gvisor:latest", "container image name that hosts the untrusted binary under gvisor")
45
+
listenAddr=flag.String("listen", ":80", "HTTP server listen address. Only applicable when --mode=server")
46
+
mode=flag.String("mode", "server", "Whether to run in \"server\" mode or \"contained\" mode. The contained mode is used internally by the server mode.")
47
+
dev=flag.Bool("dev", false, "run in dev mode (show help messages)")
48
+
numWorkers=flag.Int("workers", runtime.NumCPU(), "number of parallel gvisor containers to pre-spin up & let run concurrently")
49
+
container=flag.String("untrusted-container", "gcr.io/golang-org/playground-sandbox-gvisor:latest", "container image name that hosts the untrusted binary under gvisor")
50
+
allowImageUpdate=flag.Bool("allow-image-update", true, "Allow docker image update. If not allowed, only pull images if not present.")
50
51
)
51
52
52
53
const (
@@ -143,8 +144,16 @@ func main() {
143
144
log.Printf("Running in dev mode; container published to host at: http://localhost:8080/")
144
145
log.Printf("Run a binary with: curl -v --data-binary @/home/bradfitz/hello http://localhost:8080/run\n")
0 commit comments