Networking Between Docker Containers
If you don't want to use a docker-compose file for whatever reason you can create networking between containers manually.
How to set networking for DecisionRules in docker
How to setup multi-container app
What containers will we need:
Server App
Client App
Business Intelligence App
Redis
MongoDB
Method 1: Setup with terminal
First of all, we need to create a docker network because containers, by default, don't see other containers thus they cannot communicate with each other. We will use a simple command docker network create
Note: If you are using PowerShell on Windows you need to use `` for multi-line command!
// creating docker network space
docker network create <network_name>
// if you want to remove network
docker network remove <network_name>In the second step, we need to run all mandatory containers mentioned above. We will do it with the help of docker run . In this command, we will set ports and env variables as well.
If the command is successful it prints containers id
Your env properties configuration may vary. For all possibilities go here
Hurray! It is done. Now you can go to localhost:80 a DecisionRules should be up and running.
Method 2: Setup with docker-compose file
You can use docker-compose for a very easy setup.
Last updated