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/docker.cue
Tom Chauveau 8ce8e8e01f Add #Push definition and tests
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-05-13 21:38:15 +02:00

59 lines
901 B
CUE

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},
]
}
// Push a docker image
#Push: {
// Remote ref (example: "index.docker.io/alpine:latest")
ref: string
// Image
source: dagger.#Artifact
#up: [
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
#up: [
op.#DockerBuild & {
"context": context
"dockerfile": dockerfile
},
]
}