Building Docker images locally

You can modify and build Docker images for the Wazuh central components (manager, indexer, and dashboard) and the Wazuh agent.

  1. Clone the Wazuh Docker repository to your system:

    # git clone https://github.com/wazuh/wazuh-docker.git -b v5.0.0-beta2
    
  2. Navigate to the wazuh-docker/build-docker-images directory:

    # cd wazuh-docker/build-docker-images
    
  3. Run the build script:

    # ./build-images.sh
    

    This builds Docker images for all Wazuh components on your local system.

  4. Use the -v or --version option to build images for a different Wazuh version:

    # ./build-images.sh -v 5.0.0-beta2
    

    To get all the available script options, use the -h or --help option:

    # ./build-images.sh -h
    
    Usage: build-images.sh [OPTIONS]
    
        -d, --dev <ref>              [Optional] Set the development stage you want to build, example rc2 or beta1, not used by default.
        -refs, --references <ref>    [Optional] Set each Wazuh component reference to be build (indexer, manager, dasboard and agent). By default, using the latest release: ['latest', 'latest', 'latest', 'latest']
        -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, 5.0.0.
        -m, --multiarch              [Optional] Enable multi-architecture builds.
        -h, --help                   Show this help.