Skip to content

Commit 09e6fd9

Browse files
committed
enhance script execution of build and improve docs clarity
1 parent 5ef9697 commit 09e6fd9

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

indexer-certs-creator/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Run the following script to build the wazuh-certs-generator docker image
2121
./build-image.sh -v <IMAGE_TAG> [-m] [-rg <REGISTRY>]
2222
```
2323

24-
Replace <IMAGE_TAG> with the new image desired tag.
25-
Use the `-m` flag to build a multi-architecture image (supports both `amd64` and `arm64`)
26-
Use the `-rg <REGISTRY>` parameter to specify a custom Docker registry (default is Docker Hub)
27-
By default, the script will attempt to push the image to the registry and will only work if credentials are properly configured.
24+
- Replace <IMAGE_TAG> with the new image desired tag.
25+
- Use the `-m` flag to build a multi-architecture image (supports both `amd64` and `arm64`)
26+
- If multiarch build is enabled, the script will attempt to push the image to the registry and will only work if credentials are properly configured.
27+
- Use the `-rg <REGISTRY>` parameter to specify a custom Docker registry (default is Docker Hub)

indexer-certs-creator/build-image.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,16 @@ build() {
3737
set +a
3838

3939
if [ "${MULTIARCH}" ]; then
40-
docker buildx bake --file build-image.yml \
40+
docker buildx bake \
41+
--file build-image.yml \
4142
--set *.platform=linux/amd64,linux/arm64 \
43+
--push \
4244
--no-cache || clean 1
4345
else
44-
docker buildx bake --file build-image.yml --no-cache || clean 1
46+
docker buildx bake \
47+
--file build-image.yml \
48+
--load \
49+
--no-cache || clean 1
4550
fi
4651
return 0
4752
}

0 commit comments

Comments
 (0)