Unable to setup connector in docker environment

Hi Community,

I am setting up a connector on top of docker but while running docker with provided configuration from Kibana UI, I am getting below errors. I am not sure why docker is giving permission denied error. Can any one suggest please!

command:

docker run -v "/root/elastic-connectors:/config" --tty --rm docker.elastic.co/integrations/elastic-connectors:8.17.0 /app/bin/elastic-ingest -c /config/config.yml

Note: Running above command with root user.

Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
[FMWK][07:05:58][INFO] Running connector service version 8.17.0
[FMWK][07:05:58][INFO] Loading config from /config/config.yml
[FMWK][07:05:58][ERROR] Could not parse /config/config.yml. Check logs for more information.
[Errno 13] Permission denied: '/config/config.yml'
Traceback (most recent call last):
  File "/app/connectors/service_cli.py", line 116, in run
    config = load_config(config_file)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/connectors/config.py", line 21, in load_config
    yaml_config = EnvYAML(config_file, flatten=False).export()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/envyaml/envyaml.py", line 117, in __init__
    yaml_config = self.__read_yaml_file(
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/envyaml/envyaml.py", line 208, in __read_yaml_file
    with io.open(file_path, encoding="utf8") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/config/config.yml'
Error: Could not parse /config/config.yml. Check logs for more information

Configuration file.

connectors:
-
  connector_id: "NgMwcJQBJ82eM09mQReR"
  service_type: "microsoft_teams"
  api_key: "TkpyeWNwUUJkQ3Z6VE83REdKR3o6bE9xN3hTcTBTaks4Z3hFWWNvTzkyQQ=="
elasticsearch:
  host: "https://xx.xx.xx.xx:9200"
  api_key: "TkpyeWNwUUJkQ3Z6VE83REdKR3o6bE9xN3hTcTBTaks4Z3hFWWNvTzkyQQ=="

Hi Eshwar_K!

It seems from the error message that configuration file you're mounting into the docker container is not accessible because of permissions in the OS.

Can you check the permissions on your config directory/file to verify that the user that's running the container can access the file?

Ideally don't store config file available only to root, if that's the case.