Docker-compose volume issue

Hi

When I ran the command “docker-compose run logstash -f ./logstash/config/xxx.conf”, it appears that the configuration file couldn’t be found as the path is wrong. However, I couldn’t identify where is the issue as the configuration seems to be fine.

Error log
[2019-04-16T03:43:50,995][INFO ][logstash.agent ] No persistent UUID file found. Generating new UUID {:uuid=>“3fb0bd18-6428-498f-90d3-0fd6d33a10e2”, :path=>"/usr/share/logstash/data/uuid"}
[2019-04-16T03:43:51,463][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"/usr/share/logstash/logstash/config/xxx.conf"}
[2019-04-16T03:43:51,468][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.

docker-compose.yml
volumes:

  • ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
  • ./logstash/pipeline:/usr/share/logstash/pipeline:ro
  • ./logstash/config/xxx.conf:/usr/share/logstash/config/xxx.conf:ro

Logstash container
bash-4.2$ ls
jvm.options log4j2.properties logstash-sample.conf xxx.conf logstash.yml pipelines.yml startup.options
bash-4.2$ pwd
/usr/share/logstash/config
bash-4.2$