Add docker cli package

Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
Helder Correia
2022-03-25 15:17:11 -01:00
parent 4f440bc67a
commit 05d79e8ba6
14 changed files with 228 additions and 90 deletions

View File

@@ -0,0 +1,38 @@
package cli
import (
"dagger.io/dagger"
"universe.dagger.io/docker"
)
// Load an image into a docker daemon
#Load: {
// Image to load
image: docker.#Image
// Name and optionally a tag in the 'name:tag' format
tag: docker.#Ref
// Exported image ID
imageID: _export.imageID
// Root filesystem with exported file
result: _export.output
_export: dagger.#Export & {
"tag": tag
input: image.rootfs
config: image.config
}
#Run & {
mounts: src: {
dest: "/src"
contents: _export.output
}
command: {
name: "load"
flags: "-i": "/src/image.tar"
}
}
}