Bridge: Bridge is generally a networking device that creates a single netowrk multiple network segments. Docker implements brigde network in linux as default network
Lets create our own bridge network
lets create two containers (C1 and C2) in default bridge, exec into C1 and ping C2 by name and ip
As we see, we are able to reach other container by its ip not by name.
Lets attach container C1 and C2 to the bridge network which we created. Now ping
we can ping other container by name and ip address
Activity1: Build a spring petclinic jar
Create a linux vm with atleast 2 vcpus and 4 GB RAM
install java 17
install maven
clone spring petclinic
git clone https://github.com/spring-projects/spring-petclinic.git
cd spring-petclinic
mvn package
Building packages can be done as part of building images this lead to something which we call as multi stage building