The otel-collector-config.yaml does exist in /tmp file on host system, but got the error
$> docker run -p 4317:4317 \
-v /tmp/otel-collector-config.yaml:/etc/otel-collector-config.yaml \
otel/opentelemetry-collector:latest \
--config=/etc/otel-collector-config.yaml
Error: failed to resolve config: cannot resolve the configuration: cannot retrieve the configuration: unable to read the file file:/etc/otel-collector-config.yaml: read /etc/otel-collector-config.yaml: is a directory
2023/11/09 03:46:00 collector server run finished with error: failed to resolve config: cannot resolve the configuration: cannot retrieve the configuration: unable to read the file file:/etc/otel-collector-config.yaml: read /etc/otel-collector-config.yaml: is a directory
It appears /tmp in Mac is a symlink, so mounting it on /tmp won't work. Moving the file into different non-symlink location should fix the issue.