An example of how to isolate a docker container from outside influence
Node was used to implement two applications: appA and appB. When opening the appA page, data from appB will be requested
- Application
appAforwards port3000to the outside and becomes accessible from the outside - theglobal_networknetwork is used - The
appBapplication has port3001, but does not forward the port to the outside
Applications appA and appB are on the same local_network, so they can communicate with each other by name
For example appA accesses appB at: http://appB:3001
Repositiory uses docker-compose to build:
docker compose up -d --buildTo open the page need to get SERVER_IP where containers are located and follow the link:
SERVER_IP:3000