Commit Graph

9 Commits

Author SHA1 Message Date
Andrea Luzzardi
f7de4500a4 docs: update auto-generated docs
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2022-01-11 11:38:22 -08:00
Sam Alba
7e43838f98 docs: updated generated content
Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
2021-11-02 13:32:10 -07:00
Andrea Luzzardi
322997b74a stdlib: docker: clean up docker.#Command inputs
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-12 17:10:46 -07:00
Andrea Luzzardi
50d55a8885 op.#SaveImage: export the image ID
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-12 15:39:04 -07:00
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
Richard Jones
eadaf73d3c
regenerated docs
Signed-off-by: Richard Jones <richard@dagger.io>
2021-09-28 09:02:38 -06:00
Sam Alba
0f6a934fd0 docs: updated generated content
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-09-21 17:34:51 -07:00
Kevin Poirot
3e14920062 Update Docker #Build to incorporate image from Dockerfile
Signed-off-by: Kevin Poirot <kevin@vazee.fr>
2021-09-15 08:55:59 +02:00
jffarge
a2088a09ac docs: ♻️ merge API Reference and Universe menu entries
Signed-off-by: jffarge <jf@dagger.io>
2021-09-08 15:19:19 +02:00