- set a concrete image tag that points to a registry,
- build a controller image via the project’s Makefile,
- push that image to a registry, and
- confirm the registry contains a manifest for the tag.
1) Set the image reference
Set theIMG environment variable to a registry path and a version tag. In this recording we use a local registry at 127.0.0.1:5000 and tag v0.1.0:
2) Build the image
Use the Makefile target that forwardsIMG into Docker. The Makefile injects the tag into the Docker build so the resulting image is named as above.
manager binary in the builder stage, then copies that into a minimal runtime image in a later stage. Example (truncated) build output:
- Builder stage compiles the
managerbinary. - Runtime stage packages that binary into the final controller image.
3) Push the image to the registry
Push the tag you just built so the registry stores the layers and writes an image manifest:v0.1.0 is what Kubernetes later uses when resolving the image reference during deployment.
4) Verify the registry tag and manifest
To confirm the tag and its digest are visible in the registry (i.e., not just in your local Docker cache), inspect the image with Docker Buildx imagetools:Tags (like
v0.1.0) are mutable references, while the digest (sha256:...) is the immutable content identifier. Using the digest (for example image: 127.0.0.1:5000/course/webapp-operator@sha256:<digest>) in manifests or deployment specs guarantees the exact image bytes that will be pulled.If you’re using a local registry (e.g.,
127.0.0.1:5000) make sure the registry service is running and your Docker daemon is configured to allow pushing to that host (insecure registry settings may be required). Pushing to remote registries may also require authentication.Quick reference — common commands
Deploying with the pushed image
Now that the controller image is available from the registry, pass the sameIMG value into your deployment step (for example):