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:
18
tests/compute/dockersocket/main.cue
Normal file
18
tests/compute/dockersocket/main.cue
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"dagger.io/dagger/op"
|
||||
"dagger.io/docker"
|
||||
)
|
||||
|
||||
TestDockerSocket: #up: [
|
||||
op.#Load & {
|
||||
from: docker.#Client
|
||||
},
|
||||
|
||||
op.#Exec & {
|
||||
always: true
|
||||
mount: "/var/run/docker.sock": "docker.sock"
|
||||
args: ["docker", "info"]
|
||||
},
|
||||
]
|
Reference in New Issue
Block a user