I'm using Docker
with VirtualBox
and dinghy
and docker-compose
.
I'm creating a container via docker-compose
. The following is the docker-compose.yml
config.
rabbitmq:
image: rabbitmq:3-management
ports:
- "15672:15672"
- "5672:5672"
environment:
VIRTUAL_HOST: 'rabbitmq.docker'
VIRTUAL_PORT: 15672
RABBITMQ_DEFAULT_USER: docker
RABBITMQ_DEFAULT_PASS: docker
Everything works great. I can enter the management page of RabbitMQ
by visiting the url rabbitmq.docker:15672
and the user docker
is configured correctly.
I wanted to experiment a little so I removed the environment
section. I deleted the image and the container and built/run it again.
The thing that I don't understand is this, I could still visit the management page using the same uri, although I did not specify a virtual host this time.
The resulting yml
file is this
rabbitmq:
image: rabbitmq:3-management
ports:
- "15672:15672"
- "5672:5672"
What have I missed? Since I no longer specify a virtual host this, to my understanding, shouldn't be happening. Is there a way to see all the virtual hosts that Docker
is using?