I am trying to use Docker Desktop to run this tutorial to install wazuh in a docker container (single-node deployment). I make a new container in the docker desktop and then try to run the docker compose command in vscode but get the error mentioned in the title. I have tried to change the project directory but it always points to the root directory by /config/certs.yml. my command is
docker-compose --project-directory /com.docker.devenvironments.code/single-node --file /com.docker.devenvironments.code/single-node/generate-indexer-certs.yml run --rm generator
my directory structure is as follows:
where certs.yml is in the config folder, but upon running this command the error always points to the root folder, which is not my project folder. The only folder i want to run this from is the com.docker.devenvironments.code
folder, or somehow change where the command finds the certs.yml file. I have also tried cd
into different folders and trying to run the command, but get the same error.
Thank you very much in advance for your help!
2
Answers
Looking quickly at the documentation link provided in the question, you can try the following thing:
Move the docker-compose definition from the folder wazuh-docker/single-node/docker-compose.yml to outer directory which is the main definition wazuh-docker in your case it will be com.docker.devenvironments.code I believe into a separate <your_compose.yaml> with the same definition, but change the volume mounts as:
Wazuh App Copyright (C) 2021 Wazuh Inc. (License GPLv2)
Then,
docker-compose -f <your_compose.yaml> up
should do. Note: your_defined.yaml is the yaml with the volume mount changes and is created at the root of the project. Also, looking at the image provided in the question, you might want to revisit the documentation and run the command to generate the certificatesdocker-compose -f generate-indexer-certs.yml run --rm generator
from the single-node folder.You can change the directory of the certs.yml file in the following section of the generate-indexer-certs.yml file:
In your case: