docker socket forwarding support

- This PR adds a new mount type: `docker.sock` (in addition to `cache`
  and `tmp`)
- It's then able to mount the LOCAL (as in, from the machine running
  dagger) docker socket inside the container by pretending to be an SSH
  Agent (hijacking the SSH agent forwarding support of buildkit)

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-06-04 15:56:59 -07:00
parent 04cd927006
commit ac34df319a
7 changed files with 102 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ package op
// `true` means also ignoring the mount cache volumes
always?: true | *false
dir: string | *"/"
mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"} | {secret: _}
mount: [string]: "tmpfs" | "cache" | "docker.sock" | {from: _, path: string | *"/"} | {secret: _}
// Map of hostnames to ip
hosts?: [string]: string
// User to exec with (if left empty, will default to the set user in the image)