Logstash on Docker: how to run a pipeline?

Hello, community.

I have started digging around Logstash and I am trying to use docker image for it.
The thing is that every tutorial I have seen just shows how to integrate all components within a docker-compose file, which is very straightforward, but I haven't seen yet how to run a pipeline, because the bin/logstash -f command is intended for use in local installation, not on a dockerized one, and I am getting "another instance using the configured data directory" error.

So, once I have Logstash and ElasticSearch up and running in docker containers, how do I run a pipeline?