Fix and improve examples/simple

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-01-26 16:37:11 -08:00
parent a26b767780
commit 6f4577d501
3 changed files with 36 additions and 17 deletions

View File

@@ -21,6 +21,26 @@ www: {
#dagger: compute: _
}
// List the contents of the source directory
listing: {
string
#dagger: compute: [
dagger.#Load & {
from: base
},
dagger.#Exec & {
args: ["sh", "-c", "ls /src > /tmp/out"]
mount: "/src": {
from: source
}
},
dagger.#Export & {
source: "/tmp/out"
}
]
}
host: string
url: {
@@ -30,12 +50,9 @@ www: {
dagger.#Load & { from: base },
dagger.#Exec & {
args: ["sh", "-c", "echo -n 'https://\(host)/foo' > /tmp/out"]
// https://github.com/blocklayerhq/dagger/issues/6
mount: foo: {}
},
dagger.#Export & {
// https://github.com/blocklayerhq/dagger/issues/8
// source: "/tmp/out"
source: "/tmp/out"
},
]
}