DockerImage v1alpha1
apiVersion: tilt.dev/v1alpha1
import "github.com/tilt-dev/tilt/pkg/apis/core/v1alpha1"
DockerImage
DockerImage describes an image to build with Docker.
-
apiVersion: tilt.dev/v1alpha1
-
kind: DockerImage
-
metadata (ObjectMeta)
-
spec (DockerImageSpec)
-
status (DockerImageStatus)
DockerImageSpec
DockerImageSpec describes how to build a Docker image with docker_build
.
Most fields of this spec directly correspond to the Docker CLI.
-
ref (string), required
The named reference of the image.
-
args ([]string)
Args specifies the build arguments to the Dockerfile.
Equivalent to
--build-arg
in the docker CLI.Each item should take the form “KEY” or “KEY=VALUE”.
-
cacheFrom ([]string)
Images to use as cache sources.
Equivalent to
--cache-from
in the Docker CLI. -
cluster (string)
The name of the cluster we’re building for.
We’ll use the cluster to determine the architecture of the image to build, and the registry to build it for.
If no cluster is specified, assumes the default cluster.
-
clusterNeeds (string)
Whether the cluster needs access to the image.
If not specified, assumes we have to push up to the cluster.
-
context (string)
Context specifies the Docker build context.
Must be an absolute path on the local filesystem.
-
dockerfileContents (string)
Dockerfile contains the complete contents of the Dockerfile.
-
extraTags ([]string)
By default, Tilt creates a new temporary image reference for each build. The user can also specify their own reference, to integrate with other tooling (like build IDs for Jenkins build pipelines)
Equivalent to the docker build –tag flag.
-
imageMaps ([]string)
Names of image maps that this build depends on.
The controller will watch all the image maps, rebuild the image if any of the maps resolve to a new image, and inject them into the dockerfile.
-
network (string)
Set the networking mode for the RUN instructions in the docker build.
Equivalent to
--network
in the Docker CLI. -
platform (string)
Platform specifies architecture information for target image.
https://docs.docker.com/desktop/multi-arch/
Equivalent to
--platform
in the Docker CLI. -
pull (boolean)
Always attempt to pull a new version of the base image.
Equivalent to
--pull
in the Docker CLI. -
secrets ([]string)
Pass secrets to docker.
https://docs.docker.com/develop/develop-images/build_enhancements/#new-docker-build-secret-information
Equivalent to
--secret
in the Docker CLI. -
sshAgentConfigs ([]string)
Pass SSH secrets to docker so it can clone private repos.
https://docs.docker.com/develop/develop-images/build_enhancements/#using-ssh-to-access-private-data-in-builds
Equivalent to
--ssh
in the docker CLI. -
target (string)
Target specifies the name of the stage in the Dockerfile to build.
Equivalent to
--target
in the docker CLI.
DockerImageStatus
DockerImageStatus defines the observed state of DockerImage
-
building (DockerImageStateBuilding)
Details about a building image.
DockerImageStateBuilding expresses that an image build is in-progress.
-
completed (DockerImageStateCompleted)
Details about a finished image build.
DockerImageStateCompleted expresses when the image build is finished and no new images need to be built.
-
completed.error (string)
Error message if the build failed.
-
completed.finishedAt (MicroTime)
Time when we finished building an image
MicroTime is version of Time with microsecond level precision.
-
completed.reason (string)
The reason why the image was built.
-
completed.startedAt (MicroTime)
Time when we started building an image.
MicroTime is version of Time with microsecond level precision.
-
-
ref (string)
A fully-qualified image reference of a built image, as seen from the local network.
Usually includes a name and an immutable tag.
NB: If we’re building to a particular registry, this may have a different hostname from the Spec
Ref
field. -
stageStatuses ([]DockerImageStageStatus)
Status information about each individual build stage of the most recent image build.
*DockerImageStageStatus gives detailed report of each stage of the most recent image build.
Most stages are derived from Buildkit’s StatusResponse https://github.com/moby/buildkit/blob/35fcb28a009d6454b2915a5c8084b25ad851cf38/api/services/control/control.proto#L108 but Tilt may synthesize its own stages for the steps it owns.
Stages may be executed in parallel.*
-
stageStatuses.name (string), required
A human-readable name of the stage.
-
stageStatuses.cached (boolean)
Whether Buildkit was able to cache the stage based on inputs.
-
stageStatuses.error (string)
Error message if the stage failed. If empty, the stage succeeded.
-
stageStatuses.finishedAt (MicroTime)
The timetsamp when we completed the work on the stage.
MicroTime is version of Time with microsecond level precision.
-
stageStatuses.startedAt (MicroTime)
The timestamp when we started working on the stage.
MicroTime is version of Time with microsecond level precision.
-
-
waiting (DockerImageStateWaiting)
Details about a waiting image build.
DockerImageStateWaiting expresses what we’re waiting on to build an image.
-
waiting.reason (string)
(brief) reason the image build is waiting.
-
DockerImageList
DockerImageList
-
apiVersion: tilt.dev/v1alpha1
-
kind: DockerImageList
-
metadata (ListMeta)
-
items ([]DockerImage), required