Europa: reconcile engine.#Exec spec with implementation
Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
parent
19322a7cb9
commit
9e859e6233
@ -28,6 +28,7 @@ import (
|
||||
mounts: [name=string]: engine.#Mount
|
||||
|
||||
// Expose network ports
|
||||
// FIXME: investigate feasibility
|
||||
ports: [name=string]: {
|
||||
frontend: dagger.#Service
|
||||
backend: {
|
||||
@ -84,12 +85,7 @@ import (
|
||||
// Username or UID to ad
|
||||
// User identity for this command
|
||||
// Examples: "root", "0", "1002"
|
||||
user: string
|
||||
|
||||
// Optionally attach to command standard streams
|
||||
stdin: dagger.#Stream | *null
|
||||
stdout: dagger.#Stream | *null
|
||||
stderr: dagger.#Stream | *null
|
||||
user: string | *"root"
|
||||
|
||||
// Output fields
|
||||
{
|
||||
@ -133,11 +129,10 @@ import (
|
||||
_exec: engine.#Exec & {
|
||||
args: [cmd.name] + cmd._flatFlags + cmd.args
|
||||
input: image.rootfs
|
||||
"mounts": [ for mnt in mounts {mnt}]
|
||||
environ: [ for k, v in env {"\(k)=\(v)"}]
|
||||
"mounts": mounts
|
||||
"env": env
|
||||
"workdir": workdir
|
||||
"stdin": stdin
|
||||
// FIXME: user
|
||||
"user": user
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,32 +7,39 @@ package engine
|
||||
// Container filesystem
|
||||
input: #FS
|
||||
|
||||
// Mounts
|
||||
mounts: [...#Mount]
|
||||
// Transient filesystem mounts
|
||||
// Key is an arbitrary name, for example "app source code"
|
||||
// Value is mount configuration
|
||||
mounts: [name=string]: #Mount
|
||||
|
||||
// Command to execute
|
||||
args: [...string] | string
|
||||
// Example: ["echo", "hello, world!"]
|
||||
args: [...string]
|
||||
|
||||
// Environment variables
|
||||
environ: [...string]
|
||||
env: [key=string]: string
|
||||
|
||||
// Working directory
|
||||
workdir?: string
|
||||
workdir: string | *"/"
|
||||
|
||||
// Optionally attach to command standard input stream
|
||||
stdin?: #Stream
|
||||
// User ID or name
|
||||
user: string | *"root"
|
||||
|
||||
// Optionally attach to command standard output stream
|
||||
stdout?: #Stream
|
||||
|
||||
// Optionally attach to command standard error stream
|
||||
stderr?: #Stream
|
||||
// If set, always execute even if the operation could be cached
|
||||
always: true | *false
|
||||
|
||||
// Modified filesystem
|
||||
output: #FS
|
||||
|
||||
// Command exit code
|
||||
exit: int
|
||||
// Currently this field can only ever be zero.
|
||||
// If the command fails, DAG execution is immediately terminated.
|
||||
// FIXME: expand API to allow custom handling of failed commands
|
||||
exit: int & 0
|
||||
|
||||
// Inject hostname resolution into the container
|
||||
// key is hostname, value is IP
|
||||
hosts: [hostname=string]: string
|
||||
}
|
||||
|
||||
// A transient filesystem mount.
|
||||
|
Reference in New Issue
Block a user