I run following command to get a dump from MongoDB collection:
docker exec -it mongo mongodump --db db_name --collection col_name --out - | gzip > output.g