This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/docs/reference
Andrea Luzzardi 5a1d4bff62 Support loading artifacts into a Docker Engine
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>
2021-10-12 14:16:01 -07:00
..
argocd stdlib: argocd app support 2021-09-10 09:10:03 -07:00
aws docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
azure Adding support for azure static webapp 2021-09-13 10:39:18 -07:00
dagger Support loading artifacts into a Docker Engine 2021-10-12 14:16:01 -07:00
docker Support loading artifacts into a Docker Engine 2021-10-12 14:16:01 -07:00
gcp Add zone in GCP.#Config 2021-09-14 13:43:31 +02:00
java docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
js docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
kubernetes Update documentation 2021-09-22 20:29:20 +02:00
alpine.md docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
argocd.md argocd.#Sync now retrieve status 2021-09-10 09:10:21 -07:00
git.md docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
go.md docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
io.md docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
netlify.md docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
os.md docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
random.md docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00
README.md Adding support for azure static webapp 2021-09-13 10:39:18 -07:00
terraform.md docs: ♻️ merge API Reference and Universe menu entries 2021-09-08 15:19:19 +02:00

Index