From c6a427af707cfbb4eb1761a4c70bc17d529c924d Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Fri, 12 Dec 2025 12:44:21 -0500 Subject: [PATCH] Update documentation of certs-gen procedure --- indexer-certs-creator/README.md | 28 +++++++++++++++++++++++----- indexer-certs-creator/build-image.sh | 4 +++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/indexer-certs-creator/README.md b/indexer-certs-creator/README.md index 8ddccdf5..04808a5d 100644 --- a/indexer-certs-creator/README.md +++ b/indexer-certs-creator/README.md @@ -1,9 +1,27 @@ -# Certificate creation image build +# Certificate Creation Image Build -The dockerfile hosted in this directory is used to build the image used to boot Wazuh's single node and multi node stacks. +The dockerfile hosted in this directory is used to build the image required for generating Wazuh Docker single-node and multi-node certificate files -To create the image, the following command must be executed: +## Pre-requisites +### QEMU + +Set up QEMU to enable building multi-architecture Docker images + +Useful documentation: + +- https://www.qemu.org/download/ +- https://docs.docker.com/build/building/multi-platform/#qemu + +## Procedure + +Run the following script to build the wazuh-certs-generator docker image + +```console +./build-image.sh -v [-m] [-rg ] ``` -$ docker build -t wazuh/wazuh-certs-generator:0.0.3 . -``` + +Replace with the new image desired tag. +Use the `-m` flag to build a multi-architecture image (supports both `amd64` and `arm64`) +Use the `-rg ` parameter to specify a custom Docker registry (default is Docker Hub) + By default, the script will attempt to push the image to the registry and will only work if credentials are properly configured. diff --git a/indexer-certs-creator/build-image.sh b/indexer-certs-creator/build-image.sh index 3fd4c386..925d15a6 100755 --- a/indexer-certs-creator/build-image.sh +++ b/indexer-certs-creator/build-image.sh @@ -37,7 +37,9 @@ build() { set +a if [ "${MULTIARCH}" ]; then - docker buildx bake --file build-image.yml --push --set *.platform=linux/amd64,linux/arm64 --no-cache || clean 1 + docker buildx bake --file build-image.yml \ + --set *.platform=linux/amd64,linux/arm64 \ + --no-cache || clean 1 else docker buildx bake --file build-image.yml --no-cache || clean 1 fi