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.
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
2021-07-08 17:52:21 +02:00
2021-10-05 12:39:50 -07:00
2021-10-06 11:51:10 -07:00
2021-09-17 11:53:09 -07:00
2021-07-20 14:28:06 +02:00
2021-07-29 18:29:45 +02:00
2021-02-17 13:13:17 -08:00
2021-10-05 15:38:34 -07:00
2021-10-05 15:38:34 -07:00
2021-06-30 17:54:48 +02:00
2021-05-03 17:20:45 -07:00
2021-01-14 12:36:19 -08:00
2021-08-20 16:36:48 +02:00
2021-07-09 09:47:36 +02:00
2021-05-01 01:03:58 -07:00

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.

Getting Started

Documentation website

Description
No description provided
Readme 13 MiB
Languages
Go 52%
CUE 29.3%
Shell 9.2%
JavaScript 4.4%
SCSS 2.3%
Other 2.7%