forked from wazuh/wazuh-docker
Update documentation of certs-gen procedure
This commit is contained in:
@@ -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 <IMAGE_TAG> [-m] [-rg <REGISTRY>]
|
||||
```
|
||||
$ docker build -t wazuh/wazuh-certs-generator:0.0.3 .
|
||||
```
|
||||
|
||||
Replace <IMAGE_TAG> with the new image desired tag.
|
||||
Use the `-m` flag to build a multi-architecture image (supports both `amd64` and `arm64`)
|
||||
Use the `-rg <REGISTRY>` 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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user