Customize Docker-compose Single node issues

55 views
Skip to first unread message

Phạm Q. Đạt

unread,
Jun 19, 2023, 12:30:48 AM6/19/23
to Wazuh mailing list
Hi team,

I used docker-compose Single-node v4.4.1 to run my own Wazuh.
I did the same steps to run the Wazuh with default configuration and it works.
But when I made some changes to docker-compose.yml file to add some feature to wazuh manager.
Here is the default docker-compose.yml file:

# Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2)
version: '3.7'

services:
  wazuh.manager:
    image: wazuh/wazuh-manager:4.4.1
    hostname: wazuh.manager
    restart: always
    ports:
      - "1514:1514"
      - "1515:1515"
      - "514:514/udp"
      - "55000:55000"

....

and I modified it to:
# Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2)
version: '3.7'

services:
  wazuh.manager:
    build:
      dockerfile: Dockerfile
      context: ./config/wazuh_cluster/
    image: datpq/wazuh-manager:1.0
    hostname: wazuh.manager
    restart: always
    ports:
      - "1514:1514"
      - "1515:1515"
      - "514:514/udp"
      - "55000:55000"
...


Here is my Dockerfile:
#My dockerfile
FROM wazuh/wazuh-manager:4.4.1

RUN apt update  
RUN apt install wget -y

COPY script/malicious_actor.sh /etc/cron.daily/malicious_actor.sh

RUN ["chmod","+x","/etc/cron.daily/malicious_actor.sh"]


I relized that even I use my Dockerfile only with FROM wazuh image, it didn't work as well.
#My dockerfile
FROM wazuh/wazuh-manager:4.4.1

When I ran docker-compose up, it ran the Wazuh dashboard but when I logon, it tells me that port 55000 is offline, and I can't login successfully. 

What can I do to modify the docker-compose file to add some scrips or add some configurations to the Wazuh manager.

Hope to see your reply.

Thanks,
Dat.

Aditya Sharma

unread,
Jun 19, 2023, 1:38:48 AM6/19/23
to Wazuh mailing list

Hi Dat,

Thank you for reaching out to us.

Based on the information you provided, it seems like there might be an issue with the configuration of your Dockerfile or docker-compose.yml file.

We suggest checking the logs to see if there are any errors or warnings that might help identify the issue.

Additionally, you can try adding the necessary scripts or configurations to the Wazuh manager by mounting them as volumes in the docker-compose.yml file. For example, you can add a volume section to the wazuh.manager service like this:

volumes:

  • /path/to/scripts:/scripts

Then, you can reference the scripts in your Dockerfile or in the wazuh.manager service configuration.: https://documentation.wazuh.com/current/deployment-options/docker/wazuh-container.html#single-node-deployment

We hope this helps. Let us know if you have any further questions or concerns.

Reply all
Reply to author
Forward
0 new messages