From a5fc8fd88c9c4fbfa5ac6eeba69fd69623b1023e Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Mon, 22 Dec 2025 10:17:01 -0500 Subject: [PATCH] Improve documentation for Docker image building process and remove unused reference option --- build-docker-images/README.md | 32 ++++++++++++++++++----------- build-docker-images/build-images.sh | 9 -------- indexer-certs-creator/README.md | 6 +++++- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/build-docker-images/README.md b/build-docker-images/README.md index d4640644..8502b8c6 100644 --- a/build-docker-images/README.md +++ b/build-docker-images/README.md @@ -1,32 +1,40 @@ # Wazuh Docker Image Builder -The creation of the images for the Wazuh stack deployment in Docker is done with the build-images.yml script - -To execute the process, the following must be executed in the root of the wazuh-docker repository: - -``` -$ build-docker-images/build-images.sh -``` +The creation of the images for the Wazuh stack deployment in Docker is done with the `build-docker-images/build-images.sh` script This script initializes the environment variables needed to build each of the images. -The script allows you to build images from other versions of Wazuh, to do this you must use the -v or --version argument: +To execute it, make sure to be in the `build-docker-images` directory: +```bash +cd build-docker-images ``` -$ build-docker-images/build-images.sh -v 4.14.3 + +Then execute: + +```bash +./build-images.sh +``` + +The script also allows to build images from other versions of Wazuh by using the `-v` or `--version` argument: + +```bash +./build-images.sh -v 4.14.3 ``` To get all the available script options use the -h or --help option: -``` -$ build-docker-images/build-images.sh -h +```bash +./build-images.sh -h -Usage: build-docker-images/build-images.sh [OPTIONS] +Usage: ./build-images.sh [OPTIONS] -d, --dev [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default. -f, --filebeat-module [Optional] Set Filebeat module version. By default 0.5. -r, --revision [Optional] Package revision. By default 1 + -rg, --registry [Optional] Set the Docker registry to push the images. -v, --version [Optional] Set the Wazuh version should be builded. By default, 4.14.3. + -m, --multiarch [Optional] Enable multi-architecture builds. -h, --help Show this help. ``` \ No newline at end of file diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index 5cc8e1ae..a284b1fb 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -94,7 +94,6 @@ help() { echo " -d, --dev [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default." echo " -f, --filebeat-module [Optional] Set Filebeat module version. By default ${FILEBEAT_MODULE_VERSION}." echo " -r, --revision [Optional] Package revision. By default ${WAZUH_TAG_REVISION}" - echo " -ref, --reference [Optional] Set the Wazuh reference to build development images. By default, the latest stable release." echo " -rg, --registry [Optional] Set the Docker registry to push the images." echo " -v, --version [Optional] Set the Wazuh version should be builded. By default, ${WAZUH_IMAGE_VERSION}." echo " -m, --multiarch [Optional] Enable multi-architecture builds." @@ -140,14 +139,6 @@ main() { help 1 fi ;; - "-ref"|"--reference") - if [ -n "${2}" ]; then - WAZUH_TAG_REFERENCE="${2}" - shift 2 - else - help 1 - fi - ;; "-rg"|"--registry") if [ -n "${2}" ]; then WAZUH_REGISTRY="${2}" diff --git a/indexer-certs-creator/README.md b/indexer-certs-creator/README.md index 3f979e6f..1a6e05e3 100644 --- a/indexer-certs-creator/README.md +++ b/indexer-certs-creator/README.md @@ -16,7 +16,11 @@ Useful documentation: ## Procedure -Run the following script to build the wazuh-certs-generator docker image +Execute the following to run the script used to build the wazuh-certs-generator docker image + +```console +cd indexer-certs-creator +``` ```console ./build-image.sh -v [-m] [-rg ]