Testing the network

Let's test it, find the Gathering container – the container name in docker-compose is prefixed by the folder name, where docker-compose was started.

For instance, I have started my docker-compose stack in the compose folder. My container name will be compose_gathering_1 because of the folder name.

Then, we will connect the Gathering container. It can be achieved using the following command:

docker exec -it compose_gathering_1  /bin/bash

The docker exec command allows us to execute something inside the container. In our case, we will execute the /bin/bash program.

The command structure is like this:

docker exec -it <container name or container id> <program or instruction>

Awesome, pay attention to the command line. It should ...

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.