forked from wazuh/wazuh-docker
Replaced wazuh_app_config by wazuh_dashboard_config script
This commit is contained in:
@@ -31,7 +31,7 @@ RUN setcap 'cap_net_bind_service=-ep' /usr/share/wazuh-dashboard/node/fallback/b
|
|||||||
#
|
#
|
||||||
# Copy wazuh-dashboard from stage 0
|
# Copy wazuh-dashboard from stage 0
|
||||||
# Add entrypoint
|
# Add entrypoint
|
||||||
# Add wazuh_app_config
|
# Add wazuh_dashboard_config
|
||||||
################################################################################
|
################################################################################
|
||||||
FROM amazonlinux:2023
|
FROM amazonlinux:2023
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ ENV USER="wazuh-dashboard" \
|
|||||||
|
|
||||||
# Copy and set permissions to scripts
|
# Copy and set permissions to scripts
|
||||||
COPY config/entrypoint.sh /
|
COPY config/entrypoint.sh /
|
||||||
COPY config/wazuh_app_config.sh /
|
COPY config/wazuh_dashboard_config.sh /
|
||||||
|
|
||||||
# Update and install dependencies
|
# Update and install dependencies
|
||||||
RUN yum install shadow-utils -y && \
|
RUN yum install shadow-utils -y && \
|
||||||
@@ -71,7 +71,7 @@ RUN yum install shadow-utils -y && \
|
|||||||
--comment "$USER user" \
|
--comment "$USER user" \
|
||||||
$USER && \
|
$USER && \
|
||||||
chmod 700 /entrypoint.sh && \
|
chmod 700 /entrypoint.sh && \
|
||||||
chmod 700 /wazuh_app_config.sh && \
|
chmod 700 /wazuh_dashboard_config.sh && \
|
||||||
mkdir -p $INSTALL_DIR && \
|
mkdir -p $INSTALL_DIR && \
|
||||||
chown 1000:1000 $INSTALL_DIR && \
|
chown 1000:1000 $INSTALL_DIR && \
|
||||||
chown 1000:1000 /*.sh && \
|
chown 1000:1000 /*.sh && \
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ export OPENSEARCH_DASHBOARDS_HOME=/usr/share/wazuh-dashboard
|
|||||||
export PATH=$OPENSEARCH_DASHBOARDS_HOME/bin:$PATH
|
export PATH=$OPENSEARCH_DASHBOARDS_HOME/bin:$PATH
|
||||||
DASHBOARD_USERNAME="${DASHBOARD_USERNAME:-kibanaserver}"
|
DASHBOARD_USERNAME="${DASHBOARD_USERNAME:-kibanaserver}"
|
||||||
DASHBOARD_PASSWORD="${DASHBOARD_PASSWORD:-kibanaserver}"
|
DASHBOARD_PASSWORD="${DASHBOARD_PASSWORD:-kibanaserver}"
|
||||||
export OPENSEARCH_DASHBOARDS_CONFIG=/usr/share/wazuh-dashboard/config/opensearch_dashboards.yml
|
|
||||||
|
|
||||||
# Create and configure Wazuh dashboard keystore
|
# Create and configure Wazuh dashboard keystore
|
||||||
|
|
||||||
@@ -25,7 +24,7 @@ yes | $OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-keystore create --al
|
|||||||
echo $DASHBOARD_USERNAME | $OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-keystore add opensearch.username --stdin --allow-root && \
|
echo $DASHBOARD_USERNAME | $OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-keystore add opensearch.username --stdin --allow-root && \
|
||||||
echo $DASHBOARD_PASSWORD | $OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-keystore add opensearch.password --stdin --allow-root
|
echo $DASHBOARD_PASSWORD | $OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-keystore add opensearch.password --stdin --allow-root
|
||||||
|
|
||||||
/wazuh_app_config.sh
|
/wazuh_dashboard_config.sh
|
||||||
|
|
||||||
opensearch_dashboards_vars=(
|
opensearch_dashboards_vars=(
|
||||||
opensearch.hosts
|
opensearch.hosts
|
||||||
|
|||||||
+6
@@ -1,7 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Wazuh Docker Copyright (C) 2017, Wazuh Inc. (License GPLv2)
|
# Wazuh Docker Copyright (C) 2017, Wazuh Inc. (License GPLv2)
|
||||||
|
OPENSEARCH_DASHBOARDS_CONFIG=/usr/share/wazuh-dashboard/config/opensearch_dashboards.yml
|
||||||
|
|
||||||
declare -A CONFIG_MAP=(
|
declare -A CONFIG_MAP=(
|
||||||
|
[server.host]=$SERVER_HOST
|
||||||
|
[opensearch.hosts]=$OPENSEARCH_HOSTS
|
||||||
|
[server.ssl.key]="/usr/share/wazuh-dashboard/config/certs/dashboard-key.pem"
|
||||||
|
[server.ssl.certificate]="/usr/share/wazuh-dashboard/config/certs/dashboard.pem"
|
||||||
|
[server.ssl.certificateAuthorities]="/usr/share/wazuh-dashboard/config/certs/root-ca.pem"
|
||||||
[url]=$WAZUH_API_URL
|
[url]=$WAZUH_API_URL
|
||||||
[port]=$API_PORT
|
[port]=$API_PORT
|
||||||
[username]=$API_USERNAME
|
[username]=$API_USERNAME
|
||||||
+1
-17
@@ -43,39 +43,23 @@ The folder `wazuh-agent` contains a README explaining how to run a container wit
|
|||||||
│ │ └── Dockerfile
|
│ │ └── Dockerfile
|
||||||
│ ├── wazuh-dashboard
|
│ ├── wazuh-dashboard
|
||||||
│ │ ├── config
|
│ │ ├── config
|
||||||
│ │ │ ├── check_repository.sh
|
|
||||||
│ │ │ ├── config.sh
|
|
||||||
│ │ │ ├── config.yml
|
|
||||||
│ │ │ ├── entrypoint.sh
|
│ │ │ ├── entrypoint.sh
|
||||||
│ │ │ ├── wazuh_app_config.sh
|
│ │ │ ├── wazuh_dashboard_config.sh
|
||||||
│ │ │ └── wazuh.yml
|
|
||||||
│ │ └── Dockerfile
|
│ │ └── Dockerfile
|
||||||
│ ├── wazuh-indexer
|
│ ├── wazuh-indexer
|
||||||
│ │ ├── config
|
│ │ ├── config
|
||||||
│ │ │ ├── action_groups.yml
|
|
||||||
│ │ │ ├── check_repository.sh
|
|
||||||
│ │ │ ├── config.sh
|
│ │ │ ├── config.sh
|
||||||
│ │ │ ├── config.yml
|
|
||||||
│ │ │ ├── entrypoint.sh
|
│ │ │ ├── entrypoint.sh
|
||||||
│ │ │ ├── internal_users.yml
|
|
||||||
│ │ │ ├── opensearch.yml
|
|
||||||
│ │ │ ├── roles_mapping.yml
|
|
||||||
│ │ │ ├── roles.yml
|
|
||||||
│ │ │ └── securityadmin.sh
|
│ │ │ └── securityadmin.sh
|
||||||
│ │ └── Dockerfile
|
│ │ └── Dockerfile
|
||||||
│ └── wazuh-manager
|
│ └── wazuh-manager
|
||||||
│ ├── config
|
│ ├── config
|
||||||
│ │ ├── check_repository.sh
|
|
||||||
│ │ ├── create_user.py
|
│ │ ├── create_user.py
|
||||||
│ │ ├── etc
|
│ │ ├── etc
|
||||||
│ │ │ ├── cont-init.d
|
│ │ │ ├── cont-init.d
|
||||||
│ │ │ │ ├── 0-wazuh-init
|
│ │ │ │ ├── 0-wazuh-init
|
||||||
│ │ │ │ ├── 1-config-
|
|
||||||
│ │ │ │ └── 2-manager
|
│ │ │ │ └── 2-manager
|
||||||
│ │ │ └── services.d
|
│ │ │ └── services.d
|
||||||
│ │ │ ├──
|
|
||||||
│ │ │ │ ├── finish
|
|
||||||
│ │ │ │ └── run
|
|
||||||
│ │ │ └── ossec-logs
|
│ │ │ └── ossec-logs
|
||||||
│ │ │ └── run
|
│ │ │ └── run
|
||||||
│ │ ├── permanent_data.env
|
│ │ ├── permanent_data.env
|
||||||
|
|||||||
Reference in New Issue
Block a user