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/tests/compute/dockersocket/main.cue
Andrea Luzzardi ac34df319a 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>
2021-06-04 16:14:25 -07:00

19 lines
245 B
CUE

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"]
},
]