Develop dagger with dagger: use file package

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes 2021-04-30 01:08:06 +00:00
parent 161e67de9a
commit 2804feb004

View File

@ -3,7 +3,7 @@ package main
import ( import (
"dagger.io/dagger" "dagger.io/dagger"
"dagger.io/dagger/op" "dagger.io/file"
"dagger.io/alpine" "dagger.io/alpine"
"dagger.io/docker" "dagger.io/docker"
) )
@ -14,20 +14,11 @@ source: dagger.#Artifact
// Build the dagger binaries // Build the dagger binaries
build: { build: {
testLogs: { testLogs: {
string file.#Read & {
#up: [ from: ctr
op.#Load & { filename: "/test.log"
from: ctr }
}, }.contents
op.#Exec & {
args: ["ls", "-l", "/"]
},
op.#Export & {
source: "/test.log"
format: "string"
}
]
}
ctr: docker.#Container & { ctr: docker.#Container & {
image: docker.#ImageFromRegistry & { image: docker.#ImageFromRegistry & {