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
op.#FetchContainer & {ref: from},
// Push a docker image
#Push: {
ref: string
// Image
op.#Load & {from: source},
op.#PushContainer & {"ref": ref},
// FIXME: #Run
// Build a Docker image from the provided Dockerfile contents
// FIXME: incorporate into #Build
#ImageFromDockerfile: {
dockerfile: string
context: dagger.#Artifact
"context": context
"dockerfile": dockerfile