Docker is a container management software
Docker Image: an instruction to build a container, a snapshot, made by layers.
Container: ready-to-roll applications from docker images
benefit:
Docker Compose
- is a tool for defining& running multi-container docker applications
- use yaml files to configure application services
- can start all services with a single command: docker compose up
- can stop all services with a single command: docker compose down
- can scale up selected services when required
step :
- check verision : docker-compose -v
- install : pip install -U docker-compose
- create docker-compose file in any location
- name: docker-compose.yml
- Check validity of file by command: docker-compose config
- Run docker-compose.yml file by command: docker-compose up -d(detached mode)
- Bring down application: docker-compose down
- Tips: how to scale services:
– scale: docker-compose –scale (set number of containers to have)