From f933733a85da71dde4a69890abd9bb286fca0781 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 1 Jul 2022 10:59:52 -0300 Subject: [PATCH 1/2] add option to recreate keystore in entrypoint --- build-docker-images/wazuh-dashboard/config/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker-images/wazuh-dashboard/config/entrypoint.sh b/build-docker-images/wazuh-dashboard/config/entrypoint.sh index 03091825..290f9fa8 100644 --- a/build-docker-images/wazuh-dashboard/config/entrypoint.sh +++ b/build-docker-images/wazuh-dashboard/config/entrypoint.sh @@ -7,7 +7,7 @@ DASHBOARD_PASSWORD="${DASHBOARD_PASSWORD:-kibanaserver}" # Create and configure Wazuh dashboard keystore -$INSTALL_DIR/bin/opensearch-dashboards-keystore create --allow-root && \ +yes | $INSTALL_DIR/bin/opensearch-dashboards-keystore create --allow-root && \ echo $DASHBOARD_USERNAME | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.username --stdin --allow-root && \ echo $DASHBOARD_PASSWORD | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.password --stdin --allow-root From 9c0676014cacc0aa7a98407378e1409041b5e81b Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 1 Jul 2022 11:37:44 -0300 Subject: [PATCH 2/2] add option to recreate keystore in entrypoint --- build-docker-images/wazuh-dashboard/Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/build-docker-images/wazuh-dashboard/Dockerfile b/build-docker-images/wazuh-dashboard/Dockerfile index 990547a2..1b95ca88 100644 --- a/build-docker-images/wazuh-dashboard/Dockerfile +++ b/build-docker-images/wazuh-dashboard/Dockerfile @@ -21,11 +21,6 @@ COPY config/config.sh . COPY config/config.yml / RUN bash config.sh -# Create and configure Wazuh dashboard keystore -RUN $INSTALL_DIR/bin/opensearch-dashboards-keystore create --allow-root && \ - echo kibanaserver | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.username --stdin --allow-root && \ - echo kibanaserver | $INSTALL_DIR/bin/opensearch-dashboards-keystore add opensearch.password --stdin --allow-root - COPY config/install_wazuh_app.sh / RUN chmod 775 /install_wazuh_app.sh RUN bash /install_wazuh_app.sh