Main source of inspiration: Introduction to Microservices, Docker and Kubernetes (video)
-
What are microservices ?
- Several smaller applications communicating via well defined APIs - usually HTTP.
-
Monolithic versus microservices architecture
-
Microservices advantages
- Dynamically SCALABLE at runtime (major advantage)
-
Microservices disadvantages
- Complex networking, Overhead on database and servers
-
What is Docker ?
-
What are containers ?
- Differences of Docker Containers and Virutal Machines:
- Docker translation layer (no GUEST OS).
- Containers share Bins/Libs.
- Differences of Docker Containers and Virutal Machines:
-
Dockerfile
- What is Docker Compose and how it performs container orchestration ?
- Example of a docker-compose file (YAML).
- Scaling up containers with docker-compose.
Implementation of a microservice architecture with Docker.
$ docker ps --all # List all containers
$ docker run hello-world
A more interesting hello world: Tutum Hello World!
$ sudo docker run -d -p 3000:80 tutum/hello-world
Scaling up: change the port, get different instances running.
Learn Docker in 12 Minutes 🐳 (video)
$ docker build -t hello-world-php .
$ docker run -it --rm --name hello-world hello-world-php
$ docker run -p 80:80 -v /home/hgtllys/projects/docker-microservices/helloPHP/src:/var/www/html hello-world-php
Learn Docker Compose in 12 minutes 🐙 (video)
Implementation of a simple website in PHP consuming an API written in Python (Flask).
More information about networking with containers: Networking in Compose .