Simple Symfony Bundle to use with Symfony CLI and Docker to easily access Docker services on random port numbers.
Use Symfony CLI with the Docker Integration as described at the Symfony Server docs. Docker will use random port numbers for each service when it's container is started making it difficult to access web based UI's in those containers.
Symfony CLI adds links in the special CLI section of the toolbar for RabbitMQ UI, MailCatcher and Blackfire. Others like phpMyAdmin and Adminer are not (yet) supported. See this issue for more information. Until there is a flexible solution within Symfony CLI, we have created this solution.
These bundle re-uses the environment variables created by Symfony CLI, so no additional configuration is required. If Symfony CLI generated an URL environment variable for a service, that one is ued. If not, it is composed out of the HOST and PORT environment variables. Some services are filtered based on there protocol (only when _URL environment variable is given).
composer require webstack/docker-toolbar-bundle --dev
Suggestions for improving and extending functionality of this bundle are welcome.