sandbox
No long description provided.
Installation
dagger install github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f
Entrypoint
Return Type
Sandbox !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
func (m *myModule) example() *Sandbox {
return dag.
Sandbox()
}
@function
def example() -> dag.Sandbox:
return (
dag.sandbox()
)
@func()
example(): Sandbox {
return dag
.sandbox()
}
Types
Sandbox 🔗
home() 🔗
The sandbox’s home directory
Return Type
Directory !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
home
func (m *myModule) example() *Directory {
return dag.
Sandbox().
Home()
}
@function
def example() -> dagger.Directory:
return (
dag.sandbox()
.home()
)
@func()
example(): Directory {
return dag
.sandbox()
.home()
}
base() 🔗
Base image for the sandbox host computer
Return Type
Container !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
base
func (m *myModule) example() *Container {
return dag.
Sandbox().
Base()
}
@function
def example() -> dagger.Container:
return (
dag.sandbox()
.base()
)
@func()
example(): Container {
return dag
.sandbox()
.base()
}
runs() 🔗
Runs of script execution
Return Type
[Run ! ] !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
runs
func (m *myModule) example() []*SandboxRun {
return dag.
Sandbox().
Runs()
}
@function
def example() -> List[dag.SandboxRun]:
return (
dag.sandbox()
.runs()
)
@func()
example(): SandboxRun[] {
return dag
.sandbox()
.runs()
}
manuals() 🔗
Instruction manuals for the user of the sandbox
Return Type
[Manual ! ] !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
manuals
func (m *myModule) example() []*SandboxManual {
return dag.
Sandbox().
Manuals()
}
@function
def example() -> List[dag.SandboxManual]:
return (
dag.sandbox()
.manuals()
)
@func()
example(): SandboxManual[] {
return dag
.sandbox()
.manuals()
}
history() 🔗
Return Type
[String ! ] !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
history
func (m *myModule) example(ctx context.Context) []string {
return dag.
Sandbox().
History(ctx)
}
@function
async def example() -> List[str]:
return await (
dag.sandbox()
.history()
)
@func()
async example(): Promise<string[]> {
return dag
.sandbox()
.history()
}
host() 🔗
The host container for the sandbox
Return Type
Container !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
host
func (m *myModule) example() *Container {
return dag.
Sandbox().
Host()
}
@function
def example() -> dagger.Container:
return (
dag.sandbox()
.host()
)
@func()
example(): Container {
return dag
.sandbox()
.host()
}
changes() 🔗
All filesystem changes made to the host sandbox so far
Return Type
Directory !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
changes
func (m *myModule) example() *Directory {
return dag.
Sandbox().
Changes()
}
@function
def example() -> dagger.Directory:
return (
dag.sandbox()
.changes()
)
@func()
example(): Directory {
return dag
.sandbox()
.changes()
}
withUsername() 🔗
Return Type
Sandbox !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
username | String ! | - | No description provided |
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
with-username --username string
func (m *myModule) example(username string) *Sandbox {
return dag.
Sandbox().
WithUsername(username)
}
@function
def example(username: str) -> dag.Sandbox:
return (
dag.sandbox()
.with_username(username)
)
@func()
example(username: string): Sandbox {
return dag
.sandbox()
.withUsername(username)
}
withSecret() 🔗
Return Type
Sandbox !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
value | Secret ! | - | No description provided |
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
with-secret --name string --value env:MYSECRET
func (m *myModule) example(name string, value *Secret) *Sandbox {
return dag.
Sandbox().
WithSecret(name, value)
}
@function
def example(name: str, value: dagger.Secret) -> dag.Sandbox:
return (
dag.sandbox()
.with_secret(name, value)
)
@func()
example(name: string, value: Secret): Sandbox {
return dag
.sandbox()
.withSecret(name, value)
}
withHome() 🔗
Configure the sandbox’s home directory
Return Type
Sandbox !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
home | Directory ! | - | No description provided |
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
with-home --home DIR_PATH
func (m *myModule) example(home *Directory) *Sandbox {
return dag.
Sandbox().
WithHome(home)
}
@function
def example(home: dagger.Directory) -> dag.Sandbox:
return (
dag.sandbox()
.with_home(home)
)
@func()
example(home: Directory): Sandbox {
return dag
.sandbox()
.withHome(home)
}
readManual() 🔗
Lookup a manual and return its contents.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
key | String ! | - | No description provided |
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
read-manual --key string
func (m *myModule) example(ctx context.Context, key string) string {
return dag.
Sandbox().
ReadManual(ctx, key)
}
@function
async def example(key: str) -> str:
return await (
dag.sandbox()
.read_manual(key)
)
@func()
async example(key: string): Promise<string> {
return dag
.sandbox()
.readManual(key)
}
withNote() 🔗
Add a note to the sandbox history on behalf of the sandbox user
Return Type
Sandbox !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
note | String ! | - | No description provided |
username | String | - | The name of the user leaving the note. Default to the sandbox username |
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
with-note --note string
func (m *myModule) example(note string) *Sandbox {
return dag.
Sandbox().
WithNote(note)
}
@function
def example(note: str) -> dag.Sandbox:
return (
dag.sandbox()
.with_note(note)
)
@func()
example(note: string): Sandbox {
return dag
.sandbox()
.withNote(note)
}
withManual() 🔗
Return Type
Sandbox !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
key | String ! | - | Unique key for the manual |
description | String ! | - | Description for the knowledge. Keep it short, like the cover of a book. |
contents | String ! | - | Contents of the manual |
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
with-manual --key string --description string --contents string
func (m *myModule) example(key string, description string, contents string) *Sandbox {
return dag.
Sandbox().
WithManual(key, description, contents)
}
@function
def example(key: str, description: str, contents: str) -> dag.Sandbox:
return (
dag.sandbox()
.with_manual(key, description, contents)
)
@func()
example(key: string, description: string, contents: string): Sandbox {
return dag
.sandbox()
.withManual(key, description, contents)
}
importManuals() 🔗
Import manuals from a directory into the sandbox Any .txt or .md file will be read. - The filename (minus the extension) is the key - The first paragraph is the description - The rest of the file is the contents
Return Type
Sandbox !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | No description provided |
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
import-manuals --dir DIR_PATH
func (m *myModule) example(dir *Directory) *Sandbox {
return dag.
Sandbox().
ImportManuals(dir)
}
@function
def example(dir: dagger.Directory) -> dag.Sandbox:
return (
dag.sandbox()
.import_manuals(dir)
)
@func()
example(dir: Directory): Sandbox {
return dag
.sandbox()
.importManuals(dir)
}
lastRun() 🔗
Return Type
Run !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run
func (m *myModule) example() *SandboxRun {
return dag.
Sandbox().
LastRun()
}
@function
def example() -> dag.SandboxRun:
return (
dag.sandbox()
.last_run()
)
@func()
example(): SandboxRun {
return dag
.sandbox()
.lastRun()
}
run() 🔗
Run a script in the sandbox
Return Type
Sandbox !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
script | String ! | - | No description provided |
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
run --script string
func (m *myModule) example(script string) *Sandbox {
return dag.
Sandbox().
Run(script)
}
@function
def example(script: str) -> dag.Sandbox:
return (
dag.sandbox()
.run(script)
)
@func()
example(script: string): Sandbox {
return dag
.sandbox()
.run(script)
}
Run 🔗
username() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
username
func (m *myModule) example(ctx context.Context) string {
return dag.
Sandbox().
LastRun().
Username(ctx)
}
@function
async def example() -> str:
return await (
dag.sandbox()
.last_run()
.username()
)
@func()
async example(): Promise<string> {
return dag
.sandbox()
.lastRun()
.username()
}
script() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
script
func (m *myModule) example(ctx context.Context) string {
return dag.
Sandbox().
LastRun().
Script(ctx)
}
@function
async def example() -> str:
return await (
dag.sandbox()
.last_run()
.script()
)
@func()
async example(): Promise<string> {
return dag
.sandbox()
.lastRun()
.script()
}
hostBefore() 🔗
Return Type
Container !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
host-before
func (m *myModule) example() *Container {
return dag.
Sandbox().
LastRun().
HostBefore()
}
@function
def example() -> dagger.Container:
return (
dag.sandbox()
.last_run()
.host_before()
)
@func()
example(): Container {
return dag
.sandbox()
.lastRun()
.hostBefore()
}
hostAfter() 🔗
Return Type
Container !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
host-after
func (m *myModule) example() *Container {
return dag.
Sandbox().
LastRun().
HostAfter()
}
@function
def example() -> dagger.Container:
return (
dag.sandbox()
.last_run()
.host_after()
)
@func()
example(): Container {
return dag
.sandbox()
.lastRun()
.hostAfter()
}
stdout() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
stdout
func (m *myModule) example(ctx context.Context) string {
return dag.
Sandbox().
LastRun().
Stdout(ctx)
}
@function
async def example() -> str:
return await (
dag.sandbox()
.last_run()
.stdout()
)
@func()
async example(): Promise<string> {
return dag
.sandbox()
.lastRun()
.stdout()
}
stderr() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
stderr
func (m *myModule) example(ctx context.Context) string {
return dag.
Sandbox().
LastRun().
Stderr(ctx)
}
@function
async def example() -> str:
return await (
dag.sandbox()
.last_run()
.stderr()
)
@func()
async example(): Promise<string> {
return dag
.sandbox()
.lastRun()
.stderr()
}
exitCode() 🔗
Return Type
Integer !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
exit-code
func (m *myModule) example(ctx context.Context) int {
return dag.
Sandbox().
LastRun().
ExitCode(ctx)
}
@function
async def example() -> int:
return await (
dag.sandbox()
.last_run()
.exit_code()
)
@func()
async example(): Promise<number> {
return dag
.sandbox()
.lastRun()
.exitCode()
}
short() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
short
func (m *myModule) example(ctx context.Context) string {
return dag.
Sandbox().
LastRun().
Short(ctx)
}
@function
async def example() -> str:
return await (
dag.sandbox()
.last_run()
.short()
)
@func()
async example(): Promise<string> {
return dag
.sandbox()
.lastRun()
.short()
}
changes() 🔗
All filesystem changes made by the run
Return Type
Directory !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
changes
func (m *myModule) example() *Directory {
return dag.
Sandbox().
LastRun().
Changes()
}
@function
def example() -> dagger.Directory:
return (
dag.sandbox()
.last_run()
.changes()
)
@func()
example(): Directory {
return dag
.sandbox()
.lastRun()
.changes()
}
resultJson() 🔗
Encode the run result as JSON
Return Type
String !
Example
dagger -m github.com/shykes/x/sandbox@562433ea5e8af4568c6d1fcde10986fa814e396f call \
last-run \
result-json
func (m *myModule) example(ctx context.Context) string {
return dag.
Sandbox().
LastRun().
ResultJson(ctx)
}
@function
async def example() -> str:
return await (
dag.sandbox()
.last_run()
.result_json()
)
@func()
async example(): Promise<string> {
return dag
.sandbox()
.lastRun()
.resultJson()
}
Manual 🔗
An instruction manual for the user of the sandbox
key() 🔗
Return Type
String !
Example
Function SandboxManual.key is not accessible from the sandbox module
Function SandboxManual.key is not accessible from the sandbox module
Function SandboxManual.key is not accessible from the sandbox module
Function SandboxManual.key is not accessible from the sandbox module
description() 🔗
Return Type
String !
Example
Function SandboxManual.description is not accessible from the sandbox module
Function SandboxManual.description is not accessible from the sandbox module
Function SandboxManual.description is not accessible from the sandbox module
Function SandboxManual.description is not accessible from the sandbox module
contents() 🔗
Return Type
String !
Example
Function SandboxManual.contents is not accessible from the sandbox module
Function SandboxManual.contents is not accessible from the sandbox module
Function SandboxManual.contents is not accessible from the sandbox module
Function SandboxManual.contents is not accessible from the sandbox module