feat: add telemetry build provenance
Stamp official Docker builds with a low-cardinality provenance marker and report build_provenance/image_modified in anonymous telemetry. Local and fork builds default to custom, while official GitHub/GitLab release paths mark images as official.
This commit is contained in:
@@ -6,12 +6,18 @@ IMAGE_NAMESPACE="${IMAGE_NAMESPACE:-3252a8}"
|
||||
IMAGE_TAG="${IMAGE_TAG:-local}"
|
||||
IMAGE_PREFIX="${IMAGE_PREFIX:-remnawave-minishop}"
|
||||
DOCKERFILE="${DOCKERFILE:-deploy/docker/Dockerfile}"
|
||||
REMNAWAVE_MINISHOP_BUILD_PROVENANCE="${REMNAWAVE_MINISHOP_BUILD_PROVENANCE:-custom}"
|
||||
|
||||
build_image() {
|
||||
local target="$1"
|
||||
local image="$IMAGE_REGISTRY/$IMAGE_NAMESPACE/$IMAGE_PREFIX-$target:$IMAGE_TAG"
|
||||
echo "Building $image"
|
||||
docker build -f "$DOCKERFILE" --target "$target" -t "$image" .
|
||||
docker build \
|
||||
-f "$DOCKERFILE" \
|
||||
--target "$target" \
|
||||
--build-arg "REMNAWAVE_MINISHOP_BUILD_PROVENANCE=$REMNAWAVE_MINISHOP_BUILD_PROVENANCE" \
|
||||
-t "$image" \
|
||||
.
|
||||
}
|
||||
|
||||
build_image backend
|
||||
|
||||
Reference in New Issue
Block a user