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/pkg/universe.dagger.io/docker/test/build-dockerfile-input.cue
Vasek - Tom C c90be8423e
Add tests on docker.#Dockerfile
Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
2022-03-18 11:58:34 +01:00

35 lines
547 B
CUE

package test
import (
"dagger.io/dagger"
"dagger.io/dagger/engine"
"universe.dagger.io/docker"
)
dagger.#Plan & {
inputs: directories: testdata: path: "./testdata"
actions: {
image: docker.#Build & {
steps: [
docker.#Dockerfile & {
input: rootfs: inputs.directories.testdata.contents
},
docker.#Run & {
always: true
script: """
hello >> /test.txt
"""
},
]
}
verify: engine.#ReadFile & {
input: image.output.rootfs
path: "/test.txt"
} & {
contents: "hello world"
}
}
}