kaniko/Dockerfile
Guillaume B.B. Van Hemmen ddad91c367 - Add custom Kaniko builder and CI workflows ()
Introduce a custom Kaniko-based image for OCI container builds, including a wrapper script (`build.sh`) for flexible execution. Added Forgejo CI workflows for PR, branch, and tag builds, along with detailed documentation in the updated README. Licensed under Apache 2.0.

Reviewed-on: 
Co-authored-by: Guillaume B.B. Van Hemmen <GuillaumeHemmen@noreply.git.van-hemmen.com>
Co-committed-by: Guillaume B.B. Van Hemmen <GuillaumeHemmen@noreply.git.van-hemmen.com>
2025-05-19 09:48:07 +00:00

44 lines
2.1 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# syntax=docker/dockerfile:1.4
###############################################################################
# Custom Kaniko builder
#
# Base image : gcr.io/kaniko-project/executor:debug
# Maintainer : Guillaume "B.B" Van Hemmen <guillaume@van-hemmen.com>
# Repository : https://git.van-hemmen.com/actions/kaniko
###############################################################################
FROM gcr.io/kaniko-project/executor:debug
#-----------------------------------------------------------------------------
# Build-time args (optionally provided via --build-arg / Kaniko flags)
#-----------------------------------------------------------------------------
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
#-----------------------------------------------------------------------------
# OCI / Docker annotations
#-----------------------------------------------------------------------------
LABEL \
org.opencontainers.image.title="Kaniko Builder" \
org.opencontainers.image.description="Fork of Googles Kaniko debug image with build.sh as entrypoint" \
org.opencontainers.image.url="https://git.van-hemmen.com/actions/kaniko" \
org.opencontainers.image.source="https://git.van-hemmen.com/actions/kaniko" \
org.opencontainers.image.version="${VERSION:-unknown}" \
org.opencontainers.image.created="${BUILD_DATE:-unknown}" \
org.opencontainers.image.revision="${VCS_REF:-unknown}" \
org.opencontainers.image.licenses="APACHE 2.0" \
org.opencontainers.image.authors="Guillaume \"B.B\" Van Hemmen <guillaume@van-hemmen.com>" \
maintainer="Guillaume \"B.B\" Van Hemmen <guillaume@van-hemmen.com>"
#-----------------------------------------------------------------------------
# Copy artefacts & make the wrapper executable
#-----------------------------------------------------------------------------
COPY build.sh /usr/local/bin/build.sh
COPY LICENSE /LICENSE
RUN chmod +x /usr/local/bin/build.sh
#-----------------------------------------------------------------------------
# Runtime entrypoint
#-----------------------------------------------------------------------------
ENTRYPOINT ["/usr/local/bin/build.sh"]