简体   繁体   English

Docker 和 wazuh 容器安装

[英]Docker and wazuh container installation

I am trying to install wazuh as a docker container and then i get this below error after entering docker-compose up.我正在尝试将 wazuh 安装为 docker 容器,然后在输入 docker-compose up 后出现以下错误。 Please help请帮忙

docker-compose up
[+] Running 12/12
 ⠿ Volume "single-node_filebeat_etc"             Created                                                               0.0s
 ⠿ Volume "single-node_wazuh_queue"              Created                                                               0.0s
 ⠿ Volume "single-node_wazuh_api_configuration"  Created                                                               0.0s
 ⠿ Volume "single-node_wazuh_etc"                Created                                                               0.0s
 ⠿ Volume "single-node_wazuh_logs"               Created                                                               0.0s
 ⠿ Volume "single-node_wazuh_agentless"          Created                                                               0.0s
 ⠿ Volume "single-node_wazuh_var_multigroups"    Created                                                               0.0s
 ⠿ Volume "single-node_wazuh_integrations"       Created                                                               0.0s
 ⠿ Volume "single-node_wazuh_active_response"    Created                                                               0.0s
 ⠿ Volume "single-node_wazuh_wodles"             Created                                                               0.0s
 ⠿ Volume "single-node_filebeat_var"             Created                                                               0.0s
 ⠿ Container single-node-wazuh.manager-1         Created                                                               0.1s
Attaching to single-node-wazuh.dashboard-1, single-node-wazuh.indexer-1, single-node-wazuh.manager-1
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/8f7109a4f50746c8c4118dd0092c7a6ca75ad9de4a8aa814d81043cbe98a9002" to rootfs at "/usr/share/wazuh-indexer/config/certs/admin.pem": mount /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu/8f7109a4f50746c8c4118dd0092c7a6ca75ad9de4a8aa814d81043cbe98a9002:/usr/share/wazuh-indexer/config/certs/admin.pem (via /proc/self/fd/14), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

i tried to remove the image and added again but still same我试图删除图像并再次添加但仍然相同

The error message that can be seen in the output of the docker-compose up command refers to a problem with the certificates in the Wazuh indexer container, specifically with the admin.pem certificate, when the container starts, it does not find said file (the certificates are generated prior to deployment and are mounted in the container through a volume).docker-compose up命令的 output 中可以看到的错误消息是指 Wazuh 索引器容器中的证书有问题,特别是admin.pem证书,当容器启动时,它没有找到该文件(证书在部署之前生成并通过卷安装在容器中)。

Have you previously generated the certificates as indicated in our documentation ?您之前是否按照我们的文档中的说明生成了证书? If what you are going to do is a single-node deployment, you don't have to configure anything, just run the following command from the single-node directory of the cloned repository:如果你要做的是单节点部署,你不需要配置任何东西,只需要在克隆仓库的单节点目录下运行下面的命令:

docker-compose -f generate-indexer-certs.yml run --rm generator

After executing the above command you should have an output like the following:执行上述命令后,您应该有一个 output,如下所示:

Cert tool exists in Packages bucket
05/12/2022 13:46:24 INFO: Admin certificates created.
05/12/2022 13:46:24 INFO: Wazuh indexer certificates created.
05/12/2022 13:46:24 INFO: Wazuh server certificates created.
05/12/2022 13:46:24 INFO: Wazuh dashboard certificates created.
Moving created certificates to destination directory
changing certificate permissions
Setting UID indexer and dashboard
Setting UID for wazuh manager and worker

Once generated, run the docker-compose up command and the deployment should succeed.生成后,运行docker-compose up命令,部署应该会成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM