sandbox.create(...).
Authentication is required. Sign in with
ppio auth login, or set PPIO_API_KEY in the environment.Build a template
1
Write the Dockerfile
Create
ppio.Dockerfile in the root directory. Without --dockerfile, the CLI looks for ppio.Dockerfile first and falls back to Dockerfile.ppio.Dockerfile
2
Run the build
Pass the template name. The name must be lowercase and contain only letters, numbers, dashes and underscores.
CLI
3
Create a sandbox from the template
Once the build finishes, create sandboxes from the template by name.
CLI
Files read by the build
The minimal build reads these two files from the current directory.my-python-template
app.py
ppio.Dockerfile
Usage
CLI
Template name to create or rebuild. The name must be lowercase and contain only letters, numbers, dashes and underscores, matching
^[a-z0-9-_]+$.Options
Root directory where the command runs. Defaults to the current directory. Dockerfile lookup and the build file context resolve relative to it.
Path to the Dockerfile, relative to the root directory. Without this option, the CLI looks for
ppio.Dockerfile first and falls back to Dockerfile.Command that must exit with code 0 for the template to be considered ready. Can be used on its own.
Behavior and validation
--cmdand--ready-cmdmust be provided together. A build that passes--cmdwithout--ready-cmdfails.--ready-cmdalone is allowed.- An invalid template name, or an odd value for
--memory-mb, aborts the build before anything is sent to the server. - Build logs stream to the terminal. On success, the CLI prints Python and Node.js snippets that show how to create a sandbox from the new template.
Examples
Reads./ppio.Dockerfile, or ./Dockerfile, in the current directory:
CLI
CLI
CLI
Create a sandbox from the template
Create sandboxes from the template by name with the SDK:Node.js