45
stdlib/docker/docker.cue
Normal file
45
stdlib/docker/docker.cue
Normal file
@@ -0,0 +1,45 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/op"
|
||||
)
|
||||
|
||||
// Build a Docker image from source, using included Dockerfile
|
||||
#Build: {
|
||||
source: dagger.#Artifact
|
||||
|
||||
#up: [
|
||||
op.#DockerBuild & {
|
||||
context: source
|
||||
},
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
// Pull a docker container
|
||||
#Pull: {
|
||||
// Remote ref (example: "index.docker.io/alpine:latest")
|
||||
from: string
|
||||
|
||||
#up: [
|
||||
op.#FetchContainer & {ref: from},
|
||||
]
|
||||
}
|
||||
|
||||
// FIXME: #Push
|
||||
// FIXME: #Run
|
||||
|
||||
// Build a Docker image from the provided Dockerfile contents
|
||||
// FIXME: incorporate into #Build
|
||||
#ImageFromDockerfile: {
|
||||
dockerfile: string
|
||||
context: dagger.#Artifact
|
||||
|
||||
#up: [
|
||||
op.#DockerBuild & {
|
||||
"context": context
|
||||
"dockerfile": dockerfile
|
||||
},
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user