actions/kaniko-build/Dockerfile
vishnu-prasad-wdt 21e961d4f0
All checks were successful
Self-test kaniko-build / build-without-push (push) Successful in 7s
Add kaniko-build: shared action to build and push container images
Lets any repository on git.scotty-world.com build a Docker/OCI image from its
checked-out code and push it to the registry it chooses (scotty-git's own
container registry, Artifact Registry, Docker Hub, GHCR, ...).

Kaniko instead of docker build: the runner is a shared, long-lived VM, so
giving workflows the Docker daemon would mean root on that machine and image
layers left on its disk. Kaniko builds inside the step's own container: no
root, no privileged mode, nothing left behind. Kaniko v1.23.2 is pinned by
digest.

The action stores no credentials; each repository passes its own secret.
A self-test workflow builds a small image (without pushing) on every change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 12:39:06 +05:30

9 lines
564 B
Docker

# Kaniko v1.23.2 (the last release of the original Google project), pinned by digest so the
# build tool can never change underneath a workflow. The -debug variant includes a busybox
# shell, which the entrypoint needs for the credential setup.
FROM gcr.io/kaniko-project/executor@sha256:c3109d5926a997b100c4343944e06c6b30a6804b2f9abe0994d3de6ef92b028e
# Kept under /kaniko: Kaniko never overwrites that directory while it unpacks the base image.
COPY entrypoint.sh /kaniko/scotty-git-entrypoint.sh
ENTRYPOINT ["/busybox/sh", "/kaniko/scotty-git-entrypoint.sh"]