I like the fact that image names are handled by docker-compose
and I don't want to use container_name
to specify a fixed one. But at the same time I need to pass the generated name to a sibling image's container (based on docker's image!) so that the sibling container can ask the host to create a container based on the recently named image! Does that make any sense?
Clarification
I'm trying to configure a RabbitMQ's docker instance. And it comes in two steps. First installing a plugin and once the plugin is installed, I need to add an exchange based on that. The important part is that these steps need to be run in sequence and not parallel (the exchange requires the plugin). Through my other question, I'm trying to somehow find the RabbitMQ's container name and send a docker exec -it
command to it. And once this command returns, I need to run a new instance of Python image to run the rabbitmqadmin
script to create an exchange within the RabbitMQ.
I know it sounds complicated but this is the only way I could find to configure a RabbitMQ without making my own image.