Docker contd
Monolith
- All the business logic is developed as one single application
- In the below example the whole of ecommerce is developed as single application

- All the code is developed as one large code base
- Advantages:
- Convinient to build and deploy
- Disadvantages:
- Smaller changes also require downtimes
- All of the application should be in same programming language
Microservice
- Each Business component/functionality is created as indivudually runnable service
- Each service can be scaled and Each service can be individually update without impacting the other services

- Advantages:
- deploying without downtimes
- frequent updates
- technology independent
- Disadvantanges
- Complex and needs an external orchestration
Docker
- libContainer:
- Earlier docker engine used to speak with linux kernel to create containers, so some updates to kernels used to impact container
- docker has implemented libcontainer Refer Here which creates containers rather than depending on linux kernel
- Docker after success has started adding lots of features making it fat.
- Refer Here for oci
Install Docker
- Docker can create two types of containers
- Linux Containers:
- They run everywhere
- Windows Containers
- They run only on windows
- Linux Containers:
- Create a ubuntu 22.04 Linux vm in any cloud of your choice
- ssh into it and install docker
curl -fsSL https://get.docker.com -o install-docker.sh
sh install-docker.sh
- After installation execute
sudo docker info

Exercises
- Create a docker hub account Refer Here
- Install necessary softwares Refer Here
- Mac:
- Install homebrew Refer Here
- Git
brew install git - Visual studio code
brew install --cask visual-studio-code
