5a1d4bff62
This adds support to loading artifacts (e.g. docker.#Build, os.#Container, ...) into any arbitrary docker engine (through a dagger.#Stream for UNIX sockets or SSH for a remote engine) Implementation: - Add op.#SaveImage which serializes an artifact into an arbitrary path (docker tarball format) - Add docker.#Load which uses op.#SaveImage to serialize to disk and executes `docker load` to load it back Caveats: Because we're doing this in userspace rather than letting dagger itself load the image, the performance is pretty bad. The buildkit API is meant for streaming (get a stream of a docker image pipe it into docker load). Because of userspace, we have to load the entire docker image into memory, then serialize it in a single WriteFile LLB operation. Example: ```cue package main import ( "alpha.dagger.io/dagger" "alpha.dagger.io/docker" ) source: dagger.#Input & dagger.#Artifact dockersocket: dagger.#Input & dagger.#Stream build: docker.#Build & { "source": source } load: docker.#Load & { source: build tag: "testimage" socket: dockersocket } ``` Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com> |
||
---|---|---|
.dagger/env | ||
.github | ||
client | ||
cmd | ||
compiler | ||
docs | ||
environment | ||
keychain | ||
solver | ||
state | ||
stdlib | ||
telemetry | ||
tests | ||
util | ||
version | ||
website | ||
.gitignore | ||
.golangci.yml | ||
.goreleaser.yml | ||
.markdownlint.yaml | ||
CONTRIBUTING.md | ||
doc.go | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
install.ps1 | ||
install.sh | ||
LICENSE | ||
Makefile | ||
README.md | ||
tracing.compose.yaml | ||
universe |
Dagger
Dagger is a programmable deployment system.
Using Dagger, software builders can automate the deployment of any application to any infrastructure, in just a few lines of code.