diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index f57d4878..00eb853f 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -42,7 +42,7 @@ build() { if [ "${WAZUH_DEV_STAGE}" ];then FILEBEAT_TEMPLATE_BRANCH="v${FILEBEAT_TEMPLATE_BRANCH}-${WAZUH_DEV_STAGE,,}" if ! curl --output /dev/null --silent --head --fail "https://github.com/wazuh/wazuh/tree/${FILEBEAT_TEMPLATE_BRANCH}"; then - echo "The indicated branch does not exist in the wazuh/wazuh repository: ${FILEBEAT_TEMPLATE_BRANCH}" + echo "The indicated branch does not exist in the wazuh/wazuh repository: ${FILEBEAT_TEMPLATE_BRANCH}" clean 1 fi else @@ -71,9 +71,16 @@ build() { set +a if [ "${MULTIARCH}" ];then - docker buildx bake --file build-images.yml --push --set *.platform=linux/amd64,linux/arm64 --no-cache || clean 1 + docker buildx bake \ + --file build-images.yml \ + --push \ + --set *.platform=linux/amd64,linux/arm64 \ + --no-cache || clean 1 else - docker buildx bake --file build-images.yml --no-cache|| clean 1 + docker buildx bake \ + --file build-images.yml \ + --load \ + --no-cache || clean 1 fi return 0 } @@ -167,4 +174,4 @@ main() { clean 0 } -main "$@" \ No newline at end of file +main "$@" diff --git a/indexer-certs-creator/README.md b/indexer-certs-creator/README.md index 04808a5d..d9b20bf7 100644 --- a/indexer-certs-creator/README.md +++ b/indexer-certs-creator/README.md @@ -21,7 +21,7 @@ Run the following script to build the wazuh-certs-generator docker image ./build-image.sh -v [-m] [-rg ] ``` -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. +- Replace with the new image desired tag. +- Use the `-m` flag to build a multi-architecture image (supports both `amd64` and `arm64`) + - If multiarch build is enabled, the script will attempt to push the image to the specified registry. This image upload will only work if credentials are properly configured. +- Use the `-rg ` parameter to specify a custom Docker registry (default is Docker Hub) diff --git a/indexer-certs-creator/build-image.sh b/indexer-certs-creator/build-image.sh index 925d15a6..afa0eea2 100755 --- a/indexer-certs-creator/build-image.sh +++ b/indexer-certs-creator/build-image.sh @@ -37,11 +37,16 @@ build() { set +a if [ "${MULTIARCH}" ]; then - docker buildx bake --file build-image.yml \ + docker buildx bake \ + --file build-image.yml \ --set *.platform=linux/amd64,linux/arm64 \ + --push \ --no-cache || clean 1 else - docker buildx bake --file build-image.yml --no-cache || clean 1 + docker buildx bake \ + --file build-image.yml \ + --load \ + --no-cache || clean 1 fi return 0 } @@ -99,4 +104,4 @@ main() { clean 0 } -main "$@" \ No newline at end of file +main "$@"