ezgh sandboxes create <image> [flags] [--wait] [-- command [args...]]Create a sandbox from a container image you may pull, as <registry host>/<repository>[:tag|@digest]. It starts with the image’s own command, or the one given after –. Without flags it has 1 vCPU, 512 MiB of memory and a 5 GiB disk, and is suspended after 300 seconds with no command or file copy (--idle-seconds 0 never suspends it).
--env sets an environment variable and --env-file reads them from a file of KEY=VALUE lines (blank lines and lines starting with # are skipped); a flag wins over the file. Values are never shown again. The answer comes within about 10 seconds: --wait waits until the sandbox is running.
--bot gives the sandbox a Bot (bot_…): any code in it can get the Bot’s short-lived credentials, so give it a Bot that may do only what that code may do. It needs permission to pass the Bot, and is set at create only.
Part of ezgh sandboxes.
Examples
ezgh sandboxes create <id>.registry.ezghcloud.com/acme/app:1 --name build --wait
ezgh sandboxes create <id>.registry.ezghcloud.com/acme/app:1 --vcpus 2 --memory-mib 2048 --env MODE=test -- sleep infinityFlags
| Flag | Type | Default | Description |
|---|---|---|---|
--bot |
string | give it a Bot (bot_…): code in the sandbox gets short-lived credentials for it | |
--disk-gib |
int | its disk, 1 to 50 GiB (default 5) | |
--env |
string, repeatable | an environment variable, KEY=VALUE; repeat for more | |
--env-file |
string | a file of KEY=VALUE lines | |
--idle-seconds |
int | suspend it after this long with no command or file copy: 0 for never, or 60 to 86400 (default 300) | |
--memory-mib |
int | 512, 1024, 2048, 4096, 8192 or 16384 (default 512) | |
--name |
string | its name (default its ID) | |
--subnet |
string | start it in this VPC subnet (sbn_…) | |
--vcpus |
int | 1, 2, 4 or 8 (default 1) | |
--wait |
boolean | wait until it’s running, and print it then | |
--wait-timeout |
duration | 10m0s |
how long --wait waits |
This command also takes the global flags.