Archive for March 2019

Enable network communication between different docker containers

If we have 2 different docker networks, host from docker-compose network – 172.15.0.5 and second host is through docker start 172.16.0.2 mybash# iptables -L -n | grep DOCKER-ISOLATION DOCKER-ISOLATION-STAGE-1 all — 0.0.0.0/0 0.0.0.0/0 iptables –flush DOCKER-ISOLATION-STAGE-1 After this command containers from 172.15.0.5 can communicate with 172.16.0.2

Encapsulation in other words means code isolation

Code isolation, or encapsulation (like a capsule), is when methods wrapped into a class to make one solid piece of logic, it became like a capsule. Also, then one piece of code knows little or nothing about another