Home > Mobile >  Docker Compose: omitting directory /config/certs.yml, ERROR: no configuration file found
Docker Compose: omitting directory /config/certs.yml, ERROR: no configuration file found

Time:01-30

I am trying to use Docker Desktop to run enter image description here

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!

CodePudding user response:

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)

version: '3'

    services:
      generator:
        image: wazuh/wazuh-certs-generator:0.0.1
        hostname: wazuh-certs-generator
        volumes:
          - ./single-node/config/wazuh_indexer_ssl_certs/:/certificates/
          - ./single-node/config/certs.yml:/config/certs.yml
...

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 certificates docker-compose -f generate-indexer-certs.yml run --rm generator from the single-node folder.

CodePudding user response:

You can change the directory of the certs.yml file in the following section of the generate-indexer-certs.yml file:

volumes:
      - ./config/certs.yml:/config/certs.yml
You can replace ./config/certs.yml with the path where the certs.yml file is located.

In your case:

volumes:
      - /com.docker.devenvironments.code/single-node/config/certs.yml:/config/certs.yml
  • Related