Move connecting socket to client: network

Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
Helder Correia
2022-03-28 18:06:46 +00:00
parent 75a3ae4204
commit d771699df9
15 changed files with 117 additions and 67 deletions

View File

@@ -7,7 +7,7 @@ import (
)
dagger.#Plan & {
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
client: network: "unix:///var/run/docker.sock": connect: dagger.#Socket
actions: {
build: docker.#Build & {
@@ -16,7 +16,7 @@ dagger.#Plan & {
load: cli.#Load & {
image: build.output
host: client.filesystem."/var/run/docker.sock".read.contents
host: client.network."unix:///var/run/docker.sock".connect
tag: "myimage"
}
}

View File

@@ -6,10 +6,10 @@ import (
)
dagger.#Plan & {
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
client: network: "unix:///var/run/docker.sock": connect: dagger.#Socket
actions: run: cli.#Run & {
host: client.filesystem."/var/run/docker.sock".read.contents
host: client.network."unix:///var/run/docker.sock".connect
command: name: "info"
}
}

View File

@@ -1,5 +1,5 @@
dagger.#Plan & {
client: filesystem: "/var/run/docker.sock": read: contents: dagger.#Socket
client: network: "unix:///var/run/docker.sock": connect: dagger.#Socket
actions: {
image: alpine.#Build & {
@@ -9,7 +9,7 @@ dagger.#Plan & {
input: image.output
mounts: docker: {
dest: "/var/run/docker.sock"
contents: client.filesystem."/var/run/docker.sock".read.contents
contents: client.network."unix:///var/run/docker.sock".connect
}
command: {
name: "docker"

View File

@@ -1,8 +1,5 @@
dagger.#Plan & {
client: filesystem: "//./pipe/docker_engine": read: {
contents: dagger.#Socket
type: "npipe"
}
client: network: "npipe:////./pipe/docker_engine": connect: dagger.#Socket
actions: {
image: alpine.#Build & {
@@ -12,7 +9,7 @@ dagger.#Plan & {
input: image.output
mounts: docker: {
dest: "/var/run/docker.sock"
contents: client.filesystem."//./pipe/docker_engine".read.contents
contents: client.network."npipe:////./pipe/docker_engine".connect
}
command: {
name: "docker"