diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0d036999..e67a9a5b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -192,7 +192,7 @@ jobs: run: sed -i "s//$(ip addr show docker0 | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)/g" wazuh-agent/docker-compose.yml - name: Start Wazuh agent - run: docker-compose -f wazuh-agent/docker-compose.yml up -d + run: docker compose -f wazuh-agent/docker-compose.yml up -d - name: Check Wazuh agent enrollment run: | @@ -355,7 +355,7 @@ jobs: run: sed -i "s//$(ip addr show docker0 | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)/g" wazuh-agent/docker-compose.yml - name: Start Wazuh agent - run: docker-compose -f wazuh-agent/docker-compose.yml up -d + run: docker compose -f wazuh-agent/docker-compose.yml up -d - name: Check Wazuh agent enrollment run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b7ae9e..14f09717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ All notable changes to this project will be documented in this file. ### Fixed -- None +- Update Dockerfile to copy opensearch-security files ([#1928](https://github.com/wazuh/wazuh-docker/pull/1928)) ### Deleted @@ -60,6 +60,8 @@ All notable changes to this project will be documented in this file. ### Added +- Set right ownership for malicious-ioc files on container start ([#1926](https://github.com/wazuh/wazuh-docker/pull/1926)) +- Delete services statement in wazuh agent deployment. ([#1925](https://github.com/wazuh/wazuh-docker/pull/1925)) - Add permanent_data exceptions. ([#1890](https://github.com/wazuh/wazuh-docker/pull/1890)) - Integrate bumper script via GitHub action. ([#1863](https://github.com/wazuh/wazuh-docker/pull/1863)) - Add missing malicious-ioc ruleset lists ([#1870](https://github.com/wazuh/wazuh-docker/pull/1870)) diff --git a/build-docker-images/wazuh-indexer/Dockerfile b/build-docker-images/wazuh-indexer/Dockerfile index 9c7fd189..de99bbba 100644 --- a/build-docker-images/wazuh-indexer/Dockerfile +++ b/build-docker-images/wazuh-indexer/Dockerfile @@ -68,6 +68,7 @@ RUN chown 1000:1000 /*.sh COPY --from=builder --chown=1000:1000 /usr/share/wazuh-indexer /usr/share/wazuh-indexer COPY --from=builder --chown=1000:1000 /etc/wazuh-indexer /usr/share/wazuh-indexer +COPY --from=builder --chown=1000:1000 /debian/wazuh-indexer/usr/share/wazuh-indexer /usr/share/wazuh-indexer COPY --from=builder --chown=0:0 /debian/wazuh-indexer/usr/lib/systemd /usr/lib/systemd COPY --from=builder --chown=0:0 /debian/wazuh-indexer/usr/lib/sysctl.d /usr/lib/sysctl.d COPY --from=builder --chown=0:0 /debian/wazuh-indexer/usr/lib/tmpfiles.d /usr/lib/tmpfiles.d diff --git a/build-docker-images/wazuh-manager/config/etc/cont-init.d/0-wazuh-init b/build-docker-images/wazuh-manager/config/etc/cont-init.d/0-wazuh-init index b75501f8..ca125b1b 100644 --- a/build-docker-images/wazuh-manager/config/etc/cont-init.d/0-wazuh-init +++ b/build-docker-images/wazuh-manager/config/etc/cont-init.d/0-wazuh-init @@ -167,16 +167,17 @@ set_custom_cluster_key() { } ############################################################################## -# Modify /var/ossec/queue/rids directory owner on -# container start. +# Set correct ownership for Wazuh related directories +# on container start. ############################################################################## -set_rids_owner() { +configure_permissions() { chown -R wazuh:wazuh /var/ossec/queue/rids + chown -R wazuh:wazuh /var/ossec/etc/lists } ############################################################################## -# Change any ossec user/group to wazuh user/group +# Change any ossec user/group to wazuh user/group ############################################################################## set_correct_permOwner() { @@ -226,8 +227,8 @@ main() { # Delete temporary data folder rm -rf ${WAZUH_INSTALL_PATH}/data_tmp - # Set rids directory owner - set_rids_owner + # Set correct ownership for Wazuh related directories + configure_permissions } main diff --git a/docs/ref/getting-started/deployment/multi-node.md b/docs/ref/getting-started/deployment/multi-node.md index 8c096fea..19f9e968 100644 --- a/docs/ref/getting-started/deployment/multi-node.md +++ b/docs/ref/getting-started/deployment/multi-node.md @@ -17,18 +17,18 @@ This deployment utilizes the `multi-node/docker-compose.yml` file, which defines 3. Run the script to generate the necessary certificates for the Wazuh Stack. This ensures secure communication between the nodes: ```bash - docker-compose -f generate-indexer-certs.yml run --rm generator + docker compose -f generate-indexer-certs.yml run --rm generator ``` -4. Start the Wazuh environment using `docker-compose`: +4. Start the Wazuh environment using `docker compose`: * To run in the foreground (logs will be displayed in your current terminal; press `Ctrl+C` to stop): ```bash - docker-compose up + docker compose up ``` * To run in the background (detached mode, allowing the containers to run independently of your terminal): ```bash - docker-compose up -d + docker compose up -d ``` Please allow some time for the environment to initialize, especially on the first run. A multi-node setup can take a few minutes (depending on your host resources and network) as the Wazuh Indexer cluster forms, and the necessary indexes and index patterns are generated. diff --git a/docs/ref/getting-started/deployment/single-node.md b/docs/ref/getting-started/deployment/single-node.md index b36f8190..f5ab7eb8 100644 --- a/docs/ref/getting-started/deployment/single-node.md +++ b/docs/ref/getting-started/deployment/single-node.md @@ -17,18 +17,18 @@ This deployment uses the `single-node/docker-compose.yml` file, which defines a 3. Run the script to generate the necessary certificates for the Wazuh Stack. This ensures secure communication between the nodes: ```bash - docker-compose -f generate-indexer-certs.yml run --rm generator + docker compose -f generate-indexer-certs.yml run --rm generator ``` -4. Start the Wazuh environment using `docker-compose`: +4. Start the Wazuh environment using `docker compose`: * To run in the foreground (logs will be displayed in your current terminal; press `Ctrl+C` to stop): ```bash - docker-compose up + docker compose up ``` * To run in the background (detached mode, allowing the containers to run independently of your terminal): ```bash - docker-compose up -d + docker compose up -d ``` Please allow some time for the environment to initialize, especially on the first run. It can take approximately a minute or two (depending on your host's resources) as the Wazuh Indexer starts up and generates the necessary indexes and index patterns. diff --git a/docs/ref/getting-started/deployment/wazuh-agent.md b/docs/ref/getting-started/deployment/wazuh-agent.md index 82773d8d..718718a3 100644 --- a/docs/ref/getting-started/deployment/wazuh-agent.md +++ b/docs/ref/getting-started/deployment/wazuh-agent.md @@ -23,14 +23,14 @@ Follow these steps to deploy the Wazuh agent using Docker. ``` **Note:** Replace `` with the actual IP address or hostname of your Wazuh manager. -3. Start the environment using `docker-compose`: +3. Start the environment using `docker compose`: * To run in the foreground (logs will be displayed in your current terminal, and you can stop it with `Ctrl+C`): ```bash - docker-compose up + docker compose up ``` * To run in the background (detached mode, allowing the container to run independently of your terminal): ```bash - docker-compose up -d + docker compose up -d ``` \ No newline at end of file diff --git a/wazuh-agent/docker-compose.yml b/wazuh-agent/docker-compose.yml index 150c17e6..4a659629 100644 --- a/wazuh-agent/docker-compose.yml +++ b/wazuh-agent/docker-compose.yml @@ -1,6 +1,4 @@ # Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2) -version: '3.7' - services: wazuh.agent: image: wazuh/wazuh-agent:5.0.0