refactored to follow the original stream test
Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
parent
94ed741320
commit
a78b84429d
@ -12,8 +12,5 @@ setup() {
|
|||||||
|
|
||||||
@test "plan: unix socket" {
|
@test "plan: unix socket" {
|
||||||
cd "$TESTDIR"
|
cd "$TESTDIR"
|
||||||
"$DAGGER" --europa up ./plan/hello-europa
|
"$DAGGER" --europa up ./plan/context/services/unix
|
||||||
run curl http://localhost:8080
|
|
||||||
assert_output --partial "<title>Hello World</title>"
|
|
||||||
docker rm -f nginx-hello
|
|
||||||
}
|
}
|
@ -2,15 +2,24 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"alpha.dagger.io/dagger/engine"
|
"alpha.dagger.io/dagger/engine"
|
||||||
"alpha.dagger.io/docker"
|
"alpha.dagger.io/dagger/op"
|
||||||
|
"alpha.dagger.io/alpine"
|
||||||
)
|
)
|
||||||
|
|
||||||
engine.#Plan & {
|
engine.#Plan & {
|
||||||
context: services: dockerSocket: unix: "/var/run/docker.sock"
|
context: services: dockerSocket: unix: "/var/run/docker.sock"
|
||||||
actions: nginx: docker.#Run & {
|
|
||||||
ref: "nginxdemos/nginx-hello"
|
actions: {
|
||||||
name: "nginx-hello"
|
load: op.#Load & {
|
||||||
ports: ["8080:8080"]
|
from: alpine.#Image & {
|
||||||
socket: context.services.dockerSocket.service
|
package: "docker-cli": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exec: op.#Exec & {
|
||||||
|
always: true
|
||||||
|
mount: "/var/run/docker.sock": stream: context.services.dockerSocket.service
|
||||||
|
args: ["docker", "info"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user