forked from wazuh/wazuh-docker
Improve documentation for Docker image building process and remove unused reference option
This commit is contained in:
@@ -1,32 +1,40 @@
|
|||||||
# Wazuh Docker Image Builder
|
# Wazuh Docker Image Builder
|
||||||
|
|
||||||
The creation of the images for the Wazuh stack deployment in Docker is done with the build-images.yml script
|
The creation of the images for the Wazuh stack deployment in Docker is done with the `build-docker-images/build-images.sh` script
|
||||||
|
|
||||||
To execute the process, the following must be executed in the root of the wazuh-docker repository:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ build-docker-images/build-images.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
This script initializes the environment variables needed to build each of the images.
|
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:
|
To get all the available script options use the -h or --help option:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ build-docker-images/build-images.sh -h
|
./build-images.sh -h
|
||||||
|
|
||||||
Usage: build-docker-images/build-images.sh [OPTIONS]
|
Usage: ./build-images.sh [OPTIONS]
|
||||||
|
|
||||||
-d, --dev <ref> [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default.
|
-d, --dev <ref> [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default.
|
||||||
-f, --filebeat-module <ref> [Optional] Set Filebeat module version. By default 0.5.
|
-f, --filebeat-module <ref> [Optional] Set Filebeat module version. By default 0.5.
|
||||||
-r, --revision <rev> [Optional] Package revision. By default 1
|
-r, --revision <rev> [Optional] Package revision. By default 1
|
||||||
|
-rg, --registry <reg> [Optional] Set the Docker registry to push the images.
|
||||||
-v, --version <ver> [Optional] Set the Wazuh version should be builded. By default, 4.14.3.
|
-v, --version <ver> [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.
|
-h, --help Show this help.
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -94,7 +94,6 @@ help() {
|
|||||||
echo " -d, --dev <ref> [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default."
|
echo " -d, --dev <ref> [Optional] Set the development stage you want to build, example rc1 or beta1, not used by default."
|
||||||
echo " -f, --filebeat-module <ref> [Optional] Set Filebeat module version. By default ${FILEBEAT_MODULE_VERSION}."
|
echo " -f, --filebeat-module <ref> [Optional] Set Filebeat module version. By default ${FILEBEAT_MODULE_VERSION}."
|
||||||
echo " -r, --revision <rev> [Optional] Package revision. By default ${WAZUH_TAG_REVISION}"
|
echo " -r, --revision <rev> [Optional] Package revision. By default ${WAZUH_TAG_REVISION}"
|
||||||
echo " -ref, --reference <ref> [Optional] Set the Wazuh reference to build development images. By default, the latest stable release."
|
|
||||||
echo " -rg, --registry <reg> [Optional] Set the Docker registry to push the images."
|
echo " -rg, --registry <reg> [Optional] Set the Docker registry to push the images."
|
||||||
echo " -v, --version <ver> [Optional] Set the Wazuh version should be builded. By default, ${WAZUH_IMAGE_VERSION}."
|
echo " -v, --version <ver> [Optional] Set the Wazuh version should be builded. By default, ${WAZUH_IMAGE_VERSION}."
|
||||||
echo " -m, --multiarch [Optional] Enable multi-architecture builds."
|
echo " -m, --multiarch [Optional] Enable multi-architecture builds."
|
||||||
@@ -140,14 +139,6 @@ main() {
|
|||||||
help 1
|
help 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"-ref"|"--reference")
|
|
||||||
if [ -n "${2}" ]; then
|
|
||||||
WAZUH_TAG_REFERENCE="${2}"
|
|
||||||
shift 2
|
|
||||||
else
|
|
||||||
help 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"-rg"|"--registry")
|
"-rg"|"--registry")
|
||||||
if [ -n "${2}" ]; then
|
if [ -n "${2}" ]; then
|
||||||
WAZUH_REGISTRY="${2}"
|
WAZUH_REGISTRY="${2}"
|
||||||
|
|||||||
@@ -16,7 +16,11 @@ Useful documentation:
|
|||||||
|
|
||||||
## Procedure
|
## 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
|
```console
|
||||||
./build-image.sh -v <IMAGE_TAG> [-m] [-rg <REGISTRY>]
|
./build-image.sh -v <IMAGE_TAG> [-m] [-rg <REGISTRY>]
|
||||||
|
|||||||
Reference in New Issue
Block a user