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/stdlib/docker/tests/build/dockerfile.cue
Kevin Poirot 3e14920062 Update Docker #Build to incorporate image from Dockerfile
Signed-off-by: Kevin Poirot <kevin@vazee.fr>
2021-09-15 08:55:59 +02:00

57 lines
759 B
CUE

package docker
import (
"alpha.dagger.io/dagger"
"alpha.dagger.io/dagger/op"
)
TestSourceBuild: dagger.#Artifact @dagger(input)
TestBuild: {
image: #Build & {
source: TestSourceBuild
}
verify: #up: [
op.#Load & {
from: image
},
op.#Exec & {
always: true
args: [
"sh", "-c", """
grep -q "test" /test.txt
""",
]
},
]
}
TestSourceImageFromDockerfile: dagger.#Artifact @dagger(input)
TestImageFromDockerfile: {
image: #Build & {
dockerfile: """
FROM alpine
COPY test.txt /test.txt
"""
source: TestSourceImageFromDockerfile
}
verify: #up: [
op.#Load & {
from: image
},
op.#Exec & {
always: true
args: [
"sh", "-c", """
grep -q "test" /test.txt
""",
]
},
]
}